Performant way to draw Circle Segments in Skia

Since the default segment in Skia behaves kind of strange, I patched one using paths like so:



CircleSegment.vl (27.8 KB)

That is fine as long it is “static” but because of Op [Graphics.Skia.Paths] it becomes quite expensive when animating the properties of the paths. Is there a better / more performant way do this?.


cool! I thought maybe without the bool op it’s more performant. but not tested. still a little error. (have to use first point as last one again)

segment CircleSegment2.vl (31.1 KB)

if I’m not mistaken, this might have a memory leak. the unconnected path input pins will create a new path on every run (every frame, if you animate the radius pins). so I would only create one path per node on create and pass that into the cache region and clear/reset the path on every run of the cache.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.