Canvas API Feedback.

Josh Marinacci joshua at
Fri May 11 10:38:49 PDT 2012

> 4. We are sticking with an application controlled immediate mode drawing
> API for Canvas, similar to the likes of HTML 5 canvas. The rendering 
> will be triggered by the application, and not by a paint callback.

Will this enable developers to handle the infinite scrolling area use case? For example: a control which draws the an audio waveform.   It would only actually draw the visible area, letting the user pan to the area they choose.  It seems like the canvas needs some indication of when part of the canvas has been revealed and must be repainted.  The only alternative (I think) is for the program handle scrolling / revealing entirely on their own.
> 6. Removed public double measureText(string text) from the API. There
> were actually many reasons we decided to do this. First off, we knew 
> that the current spec and the names chosen implied that TextMetrics 
> would contain more than just a double (if you look at the working draft 
> of the spec last updated May 8th 
> you will 
> see that it indeed contains more information). Instead, our developers 
> can use a text node to get the information they need, and we will 
> provide a more general metrics class for text not limited to the Canvas 
> package in the future.

Awesome. The current text support in HTML Canvas is horrible. No need to emulate it.

> Thanks again,
> Joe

More information about the openjfx-dev mailing list