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

Feature: add control on target output area size #13

Open
abey79 opened this issue Mar 31, 2022 · 4 comments
Open

Feature: add control on target output area size #13

abey79 opened this issue Mar 31, 2022 · 4 comments

Comments

@abey79
Copy link
Member

abey79 commented Mar 31, 2022

Currently, the physical span of hatched's output is determined by the combination of the image resolution and the scaling factor (-s). This is unfortunate because the output's physical dimension is often something the user might want to control.

Specifically, in order to adjust the image scaling factor while keeping the same line density and physical size requires quite the contortion:

# same dimension and density:
vpype hatched -p 1mm input.png
vpype hatched -p 0.5mm -s 0.5 input.png scale 2 2

This would be solved by adding a -a/--area X Y parameter to control the physical output size. In particular, it would allow to freely adjust the scale without impacting the output dimension nor the line density:

# same dimension and density:
vpype hatched -p 1mm -a 10cm 10cm input.png
vpype hatched -s 0.5 -p 1mm -a 10cm 10cm input.png
@abey79
Copy link
Member Author

abey79 commented Mar 31, 2022

@mariana-s-fernandes any motivation to tackle this one? ;)

@mariana-s-fernandes
Copy link
Contributor

I can give it a try, but not in the next couple of weeks though :)

@mariana-s-fernandes
Copy link
Contributor

mariana-s-fernandes commented May 9, 2022

I am starting implementing this. Not sure if I understand it though. Could you pass area and scale simultaneously as input?

@mariana-s-fernandes
Copy link
Contributor

Sorry, I've started this but got derailed. I will pick it up in the future or, if someone else wants to pick it up, check my fork here https://github.com/mariana-s-fernandes/hatched/tree/area-input

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

2 participants