You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flutter only supports inner strokes (aka borders) on BoxDecoration, but the SVG export is currently using centered strokes on shapes. This means that strokes display differently if a rectangle is exported as a Container vs as a SVG shape.
If possible, perhaps SVG export could either use inner (for consistency), or support all three options with a warning for Containers.
The text was updated successfully, but these errors were encountered:
Unfortunately, this isn't easily solved within the current framework. SVG only supports center strokes, and Flutter only supports inner strokes.
It may be possible to default to inner strokes via the clipping approach mentioned in the link above, but that adds complexity and may have runtime performance implications.
It's worth noting that XD does support converting these strokes into SVG (via layering a solid fill representing the stroke), and it is available via the application.createRenditions API. It would be worth taking a look into this to see if it can be used to solve this, though it may introduce other issues for how we export shapes (ie. we would likely need to rewrite parts of the generated SVG to modify transformations and apply opacity).
Bug Description
Flutter only supports inner strokes (aka borders) on BoxDecoration, but the SVG export is currently using centered strokes on shapes. This means that strokes display differently if a rectangle is exported as a Container vs as a SVG shape.
If possible, perhaps SVG export could either use inner (for consistency), or support all three options with a warning for Containers.
The text was updated successfully, but these errors were encountered: