About the optional argument in Canvas in PyS60

478 Views Asked by At

In Python for Symbian60 blit() is defined as:

blit(image [,target=(0,0), source=((0,0),image.size), mask=None, scale=0 ])

In the optional parameter source what is the significance of image.size?

2

There are 2 best solutions below

0
On BEST ANSWER

My guess is that blit() will automatically use the result of image.size when you don't specify anything else (and thus blitting the whole image from (0,0) to (width,height)).

If you want only a smaller part of the image copied, you can use the source parameter to define a different rectangle to copy.

0
On

Think that source=((0,0)) is the top left corner and image.size is the bottom right corner. You blit whatever is between those two points.

Similar for target, btw.