gavioto / playn

Automatically exported from code.google.com/p/playn
0 stars 0 forks source link

add method: Canvas.clearRect #220

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Code change request:
- Add method 'clearRect' to Canvas Interface
  Canvas clearRect(float x, float y, float width, float height);

Purpose of code changes:
- Faster redrawing for only needed parts of Canvas.
- Dont use multiple CanvasImage's and ImageLayer's to draw complex user 
interfaces (since textdrawing is only possible with Canvas)
- is possible to redraw using current implementation, but if using 
semi-transparent ou antialiased images then the clearRect method is needed.

Implementations attached:
- Java
- Html
- Android
- iOS

For Flash Implementation, i didnt understand the FlashCanvas redrawing logic. 
The clear method is empty but fill's method are directly called (???), the 
Context2D class used for drawing have a 'clearRect' method, not used anyway.

Thanks for attention.

Original issue reported on code.google.com by enebe...@gmail.com on 2 Oct 2012 at 3:40

Attachments:

GoogleCodeExporter commented 9 years ago
Added.

Original comment by m...@samskivert.com on 27 Jan 2013 at 10:58