Re: [pygame] How to add Zoom functionality?

2008-03-03 Thread Ian Mallett
Are you trying to make a paint program?
I tried that.  You need to use pygame.transform.scale().
Unfortunately, this takes too long to be realtime, so you will need to
figure out which section will be visible in the window.  I think I
have some demo code somewhere...


Re: [pygame] How to add Zoom functionality?

2008-03-03 Thread Pete Shinners

gopal mishra wrote:
I am using Mirra to draw some shapes on the screen and set the 
environment “wx” to add the scrollbar. Does any one know how to add ZOOM 
in and zoom out functionality?


To "zoom" the shapes you are drawing, you will need to multiply the 
positions of all the points. For example, to zoom in twice as large, 
multiple the point positions by 2.0.


If you are using shapes like circles and arcs, you will also need to 
multiply any additional arguments (like radius) by the same amount.


This multiplying is all you need to zoom in and out, but you'll find it 
zooms everything away from a corner of the image, which usually isn't 
desirable. Usually you want to zoom around the center of the window. 
You'll need to figure out what the coordinate is for the window center. 
Then subtract that position from each point before scaling, and add the 
multiplied position back after scaling.




Re: [pygame] How to add Zoom functionality?

2008-03-03 Thread altern
So you want a shape that increases size and when this shape is bigger 
than the display area a scroll bar to appear in the window? I might be 
wrong but that does not sound as easy as just setting the environment to 
wx and making the shape bigger. There is some programming to be done in 
the wxPython side to make that work, check the wxpython examples at the 
wxpython website. I am not really sure how this could be done, but 
probably not so trivial.


enrike

Sibtey Mehdi(e)k dio:



To add zoom in, I want to transform the size of the shape when we select 
that shape and press “crl+I” key. If the size is increased the scroll 
bar should be added that’s why I am using ‘wx’.


 

 

 

 

Ok, so you drew some shapes on the screen. You also want to put in zoom 
in/out functionality.


 

How do you want them to be able to zoom in? What do you want to happen 
when they zoom in? What is zooming in?


Hi All

I am using Mirra to draw some shapes on the screen and set the 
environment "wx" to add the scrollbar. Does any one know how to add ZOOM 
in and zoom out functionality?


 


Thanks.

gopal

 

 





RE: [pygame] How to add Zoom functionality?

2008-03-03 Thread Sibtey Mehdi
To add zoom in, I want to transform the size of the shape when we select
that shape and press "crl+I" key. If the size is increased the scroll bar
should be added that's why I am using 'wx'. 

 

 

 

 

Ok, so you drew some shapes on the screen. You also want to put in zoom
in/out functionality.

 

How do you want them to be able to zoom in? What do you want to happen when
they zoom in? What is zooming in?

Hi All

I am using Mirra to draw some shapes on the screen and set the environment
"wx" to add the scrollbar. Does any one know how to add ZOOM in and zoom out
functionality?

 

Thanks.

gopal 

 

 



Re: [pygame] How to add Zoom functionality?

2008-03-03 Thread Sean Berry
Ok, so you drew some shapes on the screen. You also want to put in zoom
in/out functionality.

How do you want them to be able to zoom in? What do you want to happen when
they zoom in? What is zooming in?

On Sun, Mar 2, 2008 at 11:37 PM, gopal mishra <[EMAIL PROTECTED]> wrote:

>  Hi All
>
> I am using Mirra to draw some shapes on the screen and set the environment
> "wx" to add the scrollbar. Does any one know how to add ZOOM in and zoom out
> functionality?
>
>
>
> Thanks.
>
> gopal
>
>
>


[pygame] How to add Zoom functionality?

2008-03-02 Thread gopal mishra
Hi All

I am using Mirra to draw some shapes on the screen and set the environment
"wx" to add the scrollbar. Does any one know how to add ZOOM in and zoom out
functionality?

 

Thanks.

gopal