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

Line width API: alternative API #128

Open
nikochiko opened this issue Mar 11, 2024 · 1 comment
Open

Line width API: alternative API #128

nikochiko opened this issue Mar 11, 2024 · 1 comment

Comments

@nikochiko
Copy link
Collaborator

Two suggestions:

  1. Rename line_width to thickness
  2. Replace set_line_width with a transformation
let s = rectangle 50 50 in
let thick_s = s |> scale 2 |> scale_thickness 1.5 in
show [s; thick_s]

This will also change how we handle Cairo backend. We don't eagerly render and carry a half rendered canvas in memory.

Instead, we only store a list of shapes (added by show) and then render it at once within write.

@nikochiko
Copy link
Collaborator Author

I am open to alternatives for scale_thickness (and also just thickness too).

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