[PD] GEM zoom emulation !

André Schmidt andre at vju-tv.net
Thu Oct 17 15:20:33 CEST 2002

hi all,

i notized that [pix_zoom] doesnt work (atleast in win2k), so i started to 
think on an emulation for zoom using scale&translate...
and oh yeah, i got it -> [_gem-mousezoom] (i started to use character "_" 
before patches that i use as "objects")

what it does:
- leftButton (in gemwin) pressed you can select an area where to zoom
- rightButton (in gemwin) zooms back to original size

how i did it:
- leftButton pressed -> calculate X&Y pos in prosents (for translate)
- leftButton released -> calculate X&Y size to picture size in prosents 
(for scale)
- rightButton pressed -> reset translate&zoom

quite simple, me think. and it seems to work quite accurate, but i only 
tested with one size of picture&video yet...
so please report me of bugs/tips i'm not aware of, thnx...

here's the code & a test : http://www.vju-tv.net/zoom-emu.zip
(open gem-zoom-emu.pd and read the instructions)
[i used pd0.35-1, gem0.87 & zexy1.1 on win2k]

ps. can i delete files with pd (on windows!) ?

More information about the Pd-list mailing list