Reputation: 17217
suppose i have a large, static, programmatically drawn vector graphic that extends well beyond the stage.
is it recommended to mask the graphic with the stage dimensions? does the VM still draw the portion that is not on the stage?
does masking half of a programmatically drawn graphic reduce the drawing process by half?
Upvotes: 1
Views: 423
Reputation: 3079
Yes, it still draws it, even if it's beyond the stage. Performance-wise, the best thing to use is scrollRect, where your create a rectangle and tell is only to draw anything within that rectangle on screen. It's way better performance-wise than a mask too. http://gskinner.com/blog/archives/2006/11/understanding_d.html
Upvotes: 3