Daniel's Stuff

I write code

Month: October 2012

Toilets

Over the weekend I replaced the leaking inlet valve of our toilet. What should have been a 5 minute job took a couple of days as whoever installed it in the first place glued the nut joining the inlet pipe to the inlet valve. This meant that I had to cut the inlet valve out once I had managed to snap things off badly inside the cistern. No going back once I had snapped a couple of the plastic bits on the inside. Once I got it out I was able to replace it in a matter of minutes 🙂

SVG

I’ve been looking into making some software with my daughter.  She wants to make a game with some characters she has drawn, so I need a nice way to render them.  I want to make them using vector graphics, but iOS doesn’t really have a nice way of doing that.  What I am in the process of doing is making a little command line tool that converts SVG files into CoreGraphics calls.

The code can be found here on github
This is a sample of the output of the tool.  I have seen several other tools that convert the SVG paths to CoreGraphics calls, but nothing that will actually render the whole file including colours and fills.  It is still very rough and doesn’t handle things like gradient fills, but for a quick hack it is working pretty well.