3

Is there a way to draw a line (or any shape) on a canvas, and then move that line?

I didn't see a way to do it, except maybe by constantly clearing and redrawing the entire canvas. Is that the only way?

4

1 回答 1

2

这是通常的方式 - 画布与视图的更新周期相关联。SkiaSharp 为您提供所有功能,并且什么都不做。

如果您有一个需要几毫秒的复杂绘图,并且可能有缓存区域,您可以使用临时位图。当事情发生变化时,没有什么能阻止您绘制多个位图,然后在需要更新时将所有这些位图绘制到屏幕上。

于 2017-08-18T12:25:16.600 回答