Feature Request P3
Status Update
Comments
se...@google.com <se...@google.com> #2
Ahoy! Can you help triage this ticket?
se...@google.com <se...@google.com> #3
Hi Sean :) Sure, I'll give you the details that I know, and leave the rest to you.
It's not super urgent, but definitely a nice to have for folks that have to implement designs coming from tools that allow such alignment (Figma, Illustrator, Affinity Designer, etc). It will most likely require work to be done in Skia to support this, because as far as I can tell there isn't such an option implemented there — probably because SVG and CSS don't have this feature.
I don't know who the right person to assign this to is, as this is my first feature request for Compose :)
se...@google.com <se...@google.com> #4
Ah - I'll pass it to foundation for triage then thanks!
Description
Description
In Skia, and thus Compose, all border strokes are drawn center-aligned. There is no simple way to align them to the inside or outside.
While there are workarounds , they are either very cumbersome to implement, or not performant. Having the ability to align the border stroke implemented at the framework level would mean that we don't force devs to implement such workarounds, and keep an acceptable degree of performance.
Use Case
Most, if not all, design tools allow designers to choose the border stroke alignment for shapes, curves, and lines. This is a fairly commonly used attribute, but one that devs working with Compose (and Android Views, for that matter) have no straightforward way to implement.
Skia center-aligns all border strokes, but it would be great for devs to be able to match the designs they are provided in a more accurate manner, without everyone having to create custom logic to implement this common feature.