Is there a known issue with PathEffect.cornerPathE...
# compose
d
Is there a known issue with PathEffect.cornerPathEffect? It does not seem to create any corners for my path that consists of 2 lines and 2 arcs, and actually ends up breaking the path I have. Is there any other way to achieve rounded corners for Paths or GenericShapes?
I’m trying to make the border of these shapes look better. Right now they have the jagged corners and the lines look choppy. Maybe antialiasing is needed? I was able to achieve the rounded corners in flutter by having the path drawn with a Stroke but that doesn’t have the same effect in compose.
r
How are you drawing them? It looks like anti-aliasing is turned off
And it's on by default in Compose (unless you are drawing using the native canvas apis and your own paints)
r
The "choppy" lines are potentially related to this issue I filed last week: https://youtrack.jetbrains.com/issue/CMP-6748/Windows-OpenGL-renderer-appears-to-only-use-4x-antialiasing It looks like you're getting anti-aliasing, but it's poor quality.
d
@romainguy I first tried with GenericShape and a Box clipping it, and then tried drawWithCache/drawBehind, and then on a Canvas(). I think the aliasing could be a desktop (mac in my case) issue like Rob said. Any ideas for the rounded corners?
same choppiness appears for wasm as well, I haven’t done anything to modify the default antialiasing behavior (don’t know how to)