Archive for November 2009

 
 

Specifying units for an SVG path

Specifying units for an SVG path isn’t obvious at first glance.  The trick is to wrap the path in a nested svg element with it’s size specified the units you require.

In this example, the units of the path are relative the the viewBox (0 0 10 10) and the actual size will be determined by the width and height of the svg element (width=10mm, height=10mm).

<svg x="0" y="0" width="10mm" height="10mm" viewBox="0 0 10 10">
 <!-- these are all in viewBox units -->
 <path d="M 5 9  L 1 5 L 3.5 5 L 3.5 1.5 L 6.5 1.5 L 6.5 5 L 9 5 z"
       style="fill: #FFF; stroke: black; stroke-width: 0.5">
 </path>
</svg>

You can of course change the ratio of the viewBox and width/height as you please and things will scale accordingly.

Well said…

An well written and enjoyable read if you’ve ever been a developer of open source.  If you’ve a user of open source libraries then it’s something you should read.

Dear User of My Open Source Project

A quote:

Now, all of this may seem a bit harsh, but let’s analyze the relationship a bit closer. For me to do work for you, there’s got to be some kind of social bond; some kind of give-and-take; a bi-directional relationship wherein both parties have given and received. At the point when you’ve come at me with your comment, our relationship consists of one point of interaction: I’ve put work into a project and released it, and you’ve taken the project. See the lopsidedness? You’re not doing me a favor by taking the project: I have no social bond with you because you decide to take my free toilet. If you want me to do some work, a kind of quid pro quo is required up-front: some sign that you’re in the relationship, and the relationship will be give-and-take. I don’t keep careful books on how much I’ve given or taken from people, but in your case, I don’t have to: I’ve given something, you’ve given nothing, and now you’re demanding more. That’s not the kind of relationship I care to be a part of.

And a nice quote from the comments:

I’m more than willing to share because I don’t do open source for fame or ego or whatever: I’ve long since known that I don’t have the skills or the cult-follower-inspiring charisma or the Satanic pact or whatever it is that moves people from “open source developer” to “software developer micro-celebrity”. I do open source because it solves a problem for me, and I think it might help solve a problem for someone else. Or because it’s interesting, and I think someone else might find the stuff interesting, too.