Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piet-svg combined fill and stroke operation #476

Open
ratmice opened this issue Dec 5, 2021 · 0 comments
Open

piet-svg combined fill and stroke operation #476

ratmice opened this issue Dec 5, 2021 · 0 comments

Comments

@ratmice
Copy link
Contributor

ratmice commented Dec 5, 2021

When executing both RenderContext::stroke and RenderContext::fill,
passing the same Shape, such as a BezPath results in multiple path elements in the output when using piet-svg output.

I wonder if this calls for a function that combines both stroke and fill operations, or perhaps some Renderable or Drawable trait which has both shape/geometry and stroke/fill/style information.

Maybe though I'm missing some way to achieve this already via the Brush API though I don't think so.

Here is some output which rather than one path with both fill="#304040" stroke="#000000", you get 2 paths.

<path d="M550 490L580 498.0384757729337L595 472.0577136594005L565.6283359900237 461.3673022289013L534.3716640099763 461.3673022289013Z" fill="#304040" fill-opacity="0.1843137254901961" transform="matrix(1 0 0 1 0 0)"/>
<path d="M550 490L580 498.0384757729337L595 472.0577136594005L565.6283359900237 461.3673022289013L534.3716640099763 461.3673022289013Z" fill="none" stroke="#000000" stroke-opacity="1" transform="matrix(1 0 0 1 0 0)"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant