Zoom control for cards full of vector graphics

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Zoom control for cards full of vector graphics

Post by AlexAdams » Thu Jan 22, 2009 10:02 pm

In addition to my previous posting about scrolling an entire card, I am interested in how to accomplish a zoom in and out for a card full of vector graphics.

Any wisdom in that area?

Thanks,
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Jan 22, 2009 10:30 pm

Hi Alex,

First, write a function that recalculates the points of a polygon or the rect of other graphics according to a reference point and a scale. Next, set the lockScreen to true and refresh the points of all polygons (the points is a property) and reposition all other graphics with their new rects. Finally, unlock the screen with a nice fading effect ;-)

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply