Skip to content

mm conversion in draw_ellipse and draw_box missing #27

@tilmanbremer

Description

@tilmanbremer

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions