0

Application screenshot: http://i.imgur.com/0uVKZiL.png

Source file: http://pastie.org/private/rcgm6o7qso8y0vz8nfjn0w

My application draws curves and I would like to be able to zoom in and out. When I apply a scale and translate transformation, the mapCanvasImage.canvas().gfx.transform changes accordingly, but nothing changes on the screen.

enter image description here

I used to have a different render approach (source code) in which the transformation did work, but there I could not get the layer to clear after each paint (results from previous paint iterations were still visible).

Perhaps (or likely) I am doing something fundamentally wrong. :) Any advice?

4

1 回答 1

0

Canvas 提供了很好的高级函数来绘制 Bézier 曲线,但显然存在缺陷。我目前的计划是放弃 Canvas 并编写自己的代码来将 Bézier 曲线转换为线段。这真的很简单,而且还提供了使用更少 CPU 功率的额外好处,因为 Canvas 不是硬件加速的。

于 2013-10-07T10:58:04.227 回答