By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,630 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,630 IT Pros & Developers. It's quick & easy.

Zoom in, s60 image

P: 2
Hi,

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

Expand|Select|Wrap|Line Numbers
  1. canvas.blit(image, source=((sourceLocX, self.sourceLocY),
  2. (sourceLocX+ canvas.size[0],
  3. 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
Mar 21 '08 #1
Share this Question
Share on Google+
1 Reply


jlm699
100+
P: 314
Expand|Select|Wrap|Line Numbers
  1. canvas.blit(image, source=((sourceLocX, self.sourceLocY),
  2. (sourceLocX+ canvas.size[0],
  3. sourceLocY+self.canvas.size[1])))
Simply based on the code you've posted here I'd say:
Expand|Select|Wrap|Line Numbers
  1. canvas.blit(image, source = ( ( self.sourceLocX, self.sourceLocY ), \
  2.     ( self.sourceLocX + self.canvas.size[0], \
  3.       self.sourceLocY + self.canvas.size[1] ) ) )
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?
Mar 21 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.