Canvas API Feedback.
joe andresen
joseph.andresen at oracle.com
Fri May 11 11:12:06 PDT 2012
On 5/11/2012 10:38 AM, Josh Marinacci wrote:
>> 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.
There really isn's such a thing as "part" of the canvas (or really it is
just not a good idea to). You must think of canvas as an image where the
GraphicsContext will issue a bunch of draw calls to it. It is up to the
developer to choose which draw calls to issue (ie transform your calls
for scrolling events, etc.)
> The only alternative (I think) is for the program handle scrolling /
> revealing entirely on their own.
This is what you have to do. Your problem is solvable with Canvas for
sure, and we may want to provide an example on how to do this.
More information about the openjfx-dev
mailing list