Zoom in, s60 image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fishy
    New Member
    • Aug 2006
    • 2

    Zoom in, s60 image

    Hi,

    I'm writing in python for s60 (nokia cell.) and working with Canvas and Image,
    while i'm moving through the image using:

    Code:
    canvas.blit(image, source=((sourceLocX, self.sourceLocY),
    (sourceLocX+ canvas.size[0],
    sourceLocY+self.canvas.size[1])))
    i can't seems to zoom in/out, I looked into Image and Canvas documentation and still don't
    understand how to do that...
    anyone knows ?


    Best,
    PapaJ
    Python Fan
  • jlm699
    Contributor
    • Jul 2007
    • 314

    #2
    Originally posted by fishy
    Code:
    canvas.blit(image, source=((sourceLocX, self.sourceLocY),
    (sourceLocX+ canvas.size[0],
    sourceLocY+self.canvas.size[1])))
    Simply based on the code you've posted here I'd say:
    [code=python]
    canvas.blit(ima ge, source = ( ( self.sourceLocX , self.sourceLocY ), \
    ( self.sourceLocX + self.canvas.siz e[0], \
    self.sourceLocY + self.canvas.siz e[1] ) ) )[/code]

    The thing you want to make sure you keep track of is the self. notation. This allows you to access members of self . So depending on which of the elements (sourceLoc*, canvas, etc.) are members of self, they should always be prepended with self.

    What error codes are you getting? Or is simply nothing happening?

    Comment

    Working...