Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Units Shmunits #1

Closed
ashanan opened this Issue · 5 comments

2 participants

@ashanan

Everything is in pixels. I think in inches or centimeters. What's to be done?

This might be helpful: http://www.w3.org/TR/SVG/coords.html#Units

I'm happy to work on a solution, but I wanted to pick your brain first to see if you had thought about this already or had something planned.

The quick way would be to define a global unit and then just insert it in the relevant rendering functions. I haven't yet looked closely at some of the more involved functions you've got in there to know if that would interfere in any way.

@eastein
Owner

I like your quick way. Passing it into either the constructor for Layer or the render function is a solid way. Fork forth and do! Well, let me know if you do so we don't dupe the work.

I don't see a reason to make one rendering/creation cycle work in more than one unit type because that's insane and will only cause misery.

@ashanan

Agreed. Expect a pull request shortly.

@ashanan

Apparently my github fu is weak. The pull request is here: #2

@ashanan ashanan referenced this issue from a commit in ashanan/svgcuts
@ashanan ashanan An alternate fix for #1. I moved the units out of the global space an…
…d into the Line and Layer objects. I also removed units from the Layer constructor so that it doesn't break other things using svgcuts already.
93f90e1
@eastein
Owner

Sweet. Thanks for the work on this @ashanan, closing this up. Used it to good effect tonight.

@eastein eastein closed this
@ashanan

No problem. Glad to hear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.