Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
这是通常的方式 - 画布与视图的更新周期相关联。SkiaSharp 为您提供所有功能,并且什么都不做。
如果您有一个需要几毫秒的复杂绘图,并且可能有缓存区域,您可以使用临时位图。当事情发生变化时,没有什么能阻止您绘制多个位图,然后在需要更新时将所有这些位图绘制到屏幕上。