zpl icon indicating copy to clipboard operation
zpl copied to clipboard

mm conversion in draw_ellipse and draw_box missing

Open tilmanbremer opened this issue 4 years ago • 0 comments

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?

tilmanbremer avatar Oct 09 '21 09:10 tilmanbremer