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

Idea: functions to generate the stroke of a path or geom2 #1272

Open
platypii opened this issue Jul 18, 2023 · 1 comment
Open

Idea: functions to generate the stroke of a path or geom2 #1272

platypii opened this issue Jul 18, 2023 · 1 comment
Labels

Comments

@platypii
Copy link
Contributor

We should introduce functions to generate the stroke of a path.

stroke

Such functions could be useful for creating the exterior of a shape from a given path. There are cases where having only the path is not enough and one might need to add "thiccness". This could also be helpful for things like importing SVGs which can have both fill and stroke.

For paths, this functionality would essentially be offset. However, there is currently no straightforward way to compute the stroke of a geom2.

Options for stroking a path, from the svg spec:

  • width
  • cap: butt | round | square
  • join: arcs | bevel |miter | miter-clip | round
  • miterlimit
@z3dev
Copy link
Member

z3dev commented Dec 24, 2023

Maybe a little more primitive, the WebAPI provides both CanvasRenderingContext2D and Path2D interfaces for constructing 2D paths for rendering. Maybe some of these concepts could be adopted.

@z3dev z3dev added the V3 label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants