简体   繁体   中英

Infinite Canvas in Flex

I'm developing a web app using Flex. This app allows to draw forms in a Canvas (like MSPaint in Windows).

Now, I want a new feature on it: an infinite canvas. The user should be able to drag the main Canvas and this should be infinite in X and Y axis. Consecuently, this Canvas should be resized in real time.

Obviously, I don't want to create a Canvas of 1k x 1k pixels with zoom in an specific area to give the feeling of an infinite drawing area.

How could I achieve it? Any suggestions or ideas are welcome :)

EDIT:

I just read that Flash/Flex Flash/Air supports canvases up to 4056x4056 px, not infinite.

You might want to reconsider how you implement your infinite canvas - a single, ever growing canvas, is likely to cause performance issues.

Instead, consider breaking your canvas into virtual canvases of fixed size (I'd recommend much smaller than the max of 4056x4056), and then stitch them together at runtime, as the user pans around.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM