Units Shmunits #1

ashanan opened this Issue Mar 11, 2012 · 5 comments

2 participants


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.


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.


Agreed. Expect a pull request shortly.


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

@ashanan ashanan added a commit to ashanan/svgcuts that referenced this issue Mar 17, 2012
@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.

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

@eastein eastein closed this Apr 15, 2012

No problem. Glad to hear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment