mgraphics append shapes to image()
Mar 24 2015 | 6:53 pm
Quick question about the image() function in mgraphics. I need to draw an image, display it, update/append data to it. Is that possible?
Background: I need to draw 2000+ shapes in the jsui object incrementally building up my picture as I go (this is timed, sort of like an animation). So I have a counter that goes through my array of pre-calculated shapes. Of course only the shape at the current counter number is displayed. So I used a for loop to loop through the entire array up to the counter number. Works fine until the CPU comes to a grind because of the number of shapes. So I thought I could draw my context to an image and then append new shapes to that image, drawing 1 image instead of thousands of shapes...
Is this the correct approach? thanks