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

mm conversion in draw_ellipse and draw_box missing #27

Open
tilmanbremer opened this issue Oct 9, 2021 · 0 comments
Open

mm conversion in draw_ellipse and draw_box missing #27

tilmanbremer opened this issue Oct 9, 2021 · 0 comments

Comments

@tilmanbremer
Copy link

I hope that I don't misunderstand anything, but I was expecting functions like draw_ellipse() draw_box() to accept mm units, but the conversion is missing in these.

So I think this:
def draw_box(self, width, height, thickness=1, color='B', rounding=0): assert color in 'BW', "invalid color" assert rounding <= 8, "invalid rounding" self.code += "^GB%i,%i,%i,%c,%i" % (width, height, thickness, color, rounding)

should be like this:
def draw_box(self, width, height, thickness=1, color='B', rounding=0): assert color in 'BW', "invalid color" assert rounding <= 8, "invalid rounding" self.code += "^GB%i,%i,%i,%c,%i" % (width*self.dpmm, height*self.dpmm, thickness, color, rounding)

And maybe even the thickness should have a conversion in mm?

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