So, here's just a personal reminder.
(BTW, the pys60 doc has a wrong order between target and source)
1 2 app.body = c = Canvas() 3 w,h = 20,20 4 im = Image.new(size=(w,h)) 5 6 # here's prototype 7 # blit(im, source=(0,0,w,h), target=(0,0), mask=None, scale=0) 8 # here are examples 9 c.blit(im) # put entire image on top-left 10 c.blit(im, target=(70,70)) # put it about mid-screen 11 c.blit(im, (0,0,w/2,h/2)) # put a quater image on top-left 12 13 # double the image size and put it about mid-screen 14 c.blit(im, target=(60,60,100,100), scale=1)
If scale is not specified and source <> target, the image
will be clipped instead of resized.
mask is a 1-bit image with the same size as image.
1 mask = Image.new((w,h),'1')
Pixel on the image will be copied if the same pixel
on the mask is 'white'.
So we can use mask to make 'Sprite'.