Saturday, February 19, 2011

wumpus-core

Copperbox revision 2157.

I've renamed the module Core.PtSize to Core.Units and added the Centimeter and Pica types from Wumpus-Basic.

Sorting out the SVG unit problem is going to be a fair amount of work. The problem is that matrices transmitted to the generated code are scaled according to the unit in use, but this turns the identity matrix for Pica (scaling by 12) from [1,0,0,0,0,1] to [12,0,0,0,0,12]. This scales everything in SVG (or PostScript if I'd been using more extensive examples) but as coordinates are already transformed from Picas into PostScript points in the output, they don't want another scaling.

I think I'll have to fix the unit type of the CTM to be Matrix3'3 Double rather than be parametric on unit like Point, Vector, Path and the other "drawable" graphic types. As this is a big change I've added the Pica and Centimeter units from Wumpus-Basic so I can more readily test it.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.