unital / tempe

Beautiful Micropython Graphics
MIT License
2 stars 0 forks source link

Windows/sub-surfaces #45

Open corranwebster opened 2 weeks ago

corranwebster commented 2 weeks ago

There may be value in having a shape type which holds another surface. This would make it less computationally expensive to move all the shapes on the subsurface (or otherwise transform them) as a group - the subsurface's position couple be changed but the relative positions of the shapes on the subsurface would not.

The primary use-case would be for scrolling/panning, secondary might be for dragging groups of objects (eg. for basic windowing or drawing apps).

It also holds the possibility of permitting an alpha-blend operation (See #43) if we do drawing as "render to raster, then blit to primary surface" rather than just drawing directly on the primary surface.

For memory-rich environments it might also permit a back buffer to speed rendering.

corranwebster commented 1 week ago

Initial implementation in #56