Closed GoogleCodeExporter closed 9 years ago
You want to use HTML5 canvas's bezierCurveTo function ?
The problem is that it's not a generic function available for all platforms. It
exists with HTML5 canvas element, but what for Java version or Android version ?
playn.core.Canvas interface just specifies functions that are available on all
platforms. So I don't think there is a simple way to get the HTML5 canvas
element from the playn.core.Canvas instance, except doing :
playn.core.Canvas myCanvas = ... ;
CanvasElement element = ((HtmlCanvas) myCanvas).canvas();
But you lose platform independency (the code will only work for the HTML
backend of PlayN) and you'll also need to modify PlayN HTML project source code
because the "canvas()" method of the HtmlCanvas class has the package
visibility (you'll need public instead)
So this is a bad idea IMO
Original comment by mbarbe...@gmail.com
on 24 Jan 2012 at 7:48
One option would be to emulate the Bezier math on platforms that don't have it
natively, and punt straight through to bezierCurveTo with canvas. I'm not sure
there is a practical, general solution (i.e., one that balances performance and
quality) but you could write one for your specific application.
Original comment by pdr@google.com
on 24 Jan 2012 at 8:58
Original comment by samskiv...@gmail.com
on 3 Feb 2012 at 10:42
Original issue reported on code.google.com by
evgeni.g...@gmail.com
on 23 Jan 2012 at 6:17