Copperbox revision 1658.
I've updated the user guide in Wumpus-Core.
Tuesday, August 31, 2010
wumpus-core
Copperbox revision 1657.
I've added the Haddock docs back in that were in Wumpus-Core before the Fresh merge, but got omitted during it.
I've added the Haddock docs back in that were in Wumpus-Core before the Fresh merge, but got omitted during it.
wumpus-fresh / wumpus-core
Copperbox revision 1656.
I've moved the new code from Wumpus-Fresh into Wumpus-Core. The Wumpus-Fresh fork is now "done" and it has been manually merged back into Wumpus-Core.
Quite a bit of documentation has temporarily vanished as documenting Fresh wasn't a big concern, I'll re-introduce the all the documentation that remains relevant in the next commits. All the examples have been updated to compile with the changed Core modules.
I've moved the new code from Wumpus-Fresh into Wumpus-Core. The Wumpus-Fresh fork is now "done" and it has been manually merged back into Wumpus-Core.
Quite a bit of documentation has temporarily vanished as documenting Fresh wasn't a big concern, I'll re-introduce the all the documentation that remains relevant in the next commits. All the examples have been updated to compile with the changed Core modules.
wumpus-fresh
Copperbox revision 1655.
I've improved the SVG output so it now has good nesting and (hopefully) no extraneous blank lines.
The PostScript output has some extraneous blank lines due to delta changes with the graphics state (which return empty if the is no delta), however I'm not going to worry about this.
I've improved the SVG output so it now has good nesting and (hopefully) no extraneous blank lines.
The PostScript output has some extraneous blank lines due to delta changes with the graphics state (which return empty if the is no delta), however I'm not going to worry about this.
wumpus-fresh
Copperbox revision 1654.
I've improved the newline handling in the FormatCombinators module so nesting, for printing SVG, works better. Next I'll look at tidying up the SVGDoc combinators - some of the functions take lists of Doc, it would seem better if they take a single already concatenated Doc.
I've improved the newline handling in the FormatCombinators module so nesting, for printing SVG, works better. Next I'll look at tidying up the SVGDoc combinators - some of the functions take lists of Doc, it would seem better if they take a single already concatenated Doc.
wumpus-fresh
Copperbox revision 1653.
I've removed the YRange datatype and code pertaining to the previous "bad" SVG page translation scheme.
I've removed the YRange datatype and code pertaining to the previous "bad" SVG page translation scheme.
wumpus-fresh
Copperbox revision 1652.
I've implemented the SVG "trivial transformation" for Wumpus-Fresh.
The trivial transformation scales the initial picture by (1, -1) to get the origin at the top-left, then 'undoes' this transformation for certain primitives (i.e. text labels) that would otherwise be printed upside down. This is the transformation that all the released versions of Wumpus-Core use.
I've gotten bogged down trying to replace this transformation with an optimized version that does more work in the code generation and puts fewer matrix transformations in the generated SVG. Wumpus-Fresh is a fork of Wumpus-Core solely so I can make this transformation easier (by reifying affine transformations as syntax rather than matrix operations, so the are more easily reversible), but after a week on Wumpus-Fresh I really don't know how this transformation should work. The sensible option seems to be polish up Fresh as it stands (as the code is generally better than Core), and merge it back into Core.
I've implemented the SVG "trivial transformation" for Wumpus-Fresh.
The trivial transformation scales the initial picture by (1, -1) to get the origin at the top-left, then 'undoes' this transformation for certain primitives (i.e. text labels) that would otherwise be printed upside down. This is the transformation that all the released versions of Wumpus-Core use.
I've gotten bogged down trying to replace this transformation with an optimized version that does more work in the code generation and puts fewer matrix transformations in the generated SVG. Wumpus-Fresh is a fork of Wumpus-Core solely so I can make this transformation easier (by reifying affine transformations as syntax rather than matrix operations, so the are more easily reversible), but after a week on Wumpus-Fresh I really don't know how this transformation should work. The sensible option seems to be polish up Fresh as it stands (as the code is generally better than Core), and merge it back into Core.
Monday, August 30, 2010
wumpus-fresh
Copperbox revision 1651.
Work on SVG page coordinate translation. Transformed Primitives are now seemingly okay, transformed Pictures have problems.
Work on SVG page coordinate translation. Transformed Primitives are now seemingly okay, transformed Pictures have problems.
wumpus-fresh
Copperbox revision 1650.
I've added a module for SVG page translation. So far I've only looked at translating Points (within paths, within primitives...) and haven't looked at translating the CTM.
I've added a module for SVG page translation. So far I've only looked at translating Points (within paths, within primitives...) and haven't looked at translating the CTM.
wumpus-fresh
Copperbox revision 1649.
Initial work for SVG page coordinate translation. I've annotated the Locale data type with Y-range so the picture height is accessible. I haven't looked at translation yet, though I'm going to do it as a pass rather than integrate it into the code generation. Having a translation pass will be slower but it should make it significantly easier to comprehend and test.
Initial work for SVG page coordinate translation. I've annotated the Locale data type with Y-range so the picture height is accessible. I haven't looked at translation yet, though I'm going to do it as a pass rather than integrate it into the code generation. Having a translation pass will be slower but it should make it significantly easier to comprehend and test.
Sunday, August 29, 2010
wumpus-fresh
Copperbox revision 1648.
I've added more of the Picture operations from Wumpus-Core, some are missing as I might change the API a bit.
I've added more of the Picture operations from Wumpus-Core, some are missing as I might change the API a bit.
wumpus-fresh
Copperbox revision 1646.
I've added the FontMetrics example from Wumpus-Core.
Currently it doesn't work for either PostScript or SVG - SVG is expected as there is no coordinate space translation yet, but PostScript will need debugging.
Revision 1647 - fixed two bugs in PostScript output. No doubt there are more, but at least the simple FontMetrics example now works.
I've added the FontMetrics example from Wumpus-Core.
Currently it doesn't work for either PostScript or SVG - SVG is expected as there is no coordinate space translation yet, but PostScript will need debugging.
Revision 1647 - fixed two bugs in PostScript output. No doubt there are more, but at least the simple FontMetrics example now works.
wumpus-fresh
Copperbox revision 1645.
Work on making Wumpus-Fresh compatible with Wumpus-Core. Obviously there will be places where the API differs, e.g. Colour which is much simpler in Wumpus-Fresh, but otherwise Fresh should support the functionality of Wumpus-Core. Where Fresh lacks, similar functionality should be punted to Wumpus-Basic.
Work on making Wumpus-Fresh compatible with Wumpus-Core. Obviously there will be places where the API differs, e.g. Colour which is much simpler in Wumpus-Fresh, but otherwise Fresh should support the functionality of Wumpus-Core. Where Fresh lacks, similar functionality should be punted to Wumpus-Basic.
wumpus-fresh
Copperbox revision 1644.
I've sorted out the SVG output module; however coordinate space transformation is still to do, so it won't work yet.
I've sorted out the SVG output module; however coordinate space transformation is still to do, so it won't work yet.
Saturday, August 28, 2010
wumpus-fresh
Copperbox revision 1643.
File output code added to Fresh.PostScript module. All the code is now in place for this module, though it remains to be tested.
File output code added to Fresh.PostScript module. All the code is now in place for this module, though it remains to be tested.
wumpus-fresh
Copperbox revision 1640 & 1641.
Adding in AffineTrans.hs from Wumpus-Core - missed doing the svn add on 1640, corrected with 1641.
Adding in AffineTrans.hs from Wumpus-Core - missed doing the svn add on 1640, corrected with 1641.
Friday, August 27, 2010
wumpus-fresh
Copperbox revision 1639.
I've renamed the FreshIR module to be PictureInternal and added a Picture module to match Wumpus-Core.
Also I've added the new Picture constructors, though I haven't done anything with them yet. The salient difference from Wumpus-Core is that affine transformations are represented as syntax rather than an affine frame. This should mean I can manipulate the transformations more readily to convert into SVG's coordinate space.
I've renamed the FreshIR module to be PictureInternal and added a Picture module to match Wumpus-Core.
Also I've added the new Picture constructors, though I haven't done anything with them yet. The salient difference from Wumpus-Core is that affine transformations are represented as syntax rather than an affine frame. This should mean I can manipulate the transformations more readily to convert into SVG's coordinate space.
wumpus-fresh
Copperbox revision 1638.
I've worked through diffing the graphics state for PostScript output.
All of the functionality of Wumpus-Core is now in place, except for the big one - designing a Picture type that is amenable to translation to SVG coordinates (without overusing matrix transformations in the generated SVG).
I've worked through diffing the graphics state for PostScript output.
All of the functionality of Wumpus-Core is now in place, except for the big one - designing a Picture type that is amenable to translation to SVG coordinates (without overusing matrix transformations in the generated SVG).
wumpus-fresh
Copperbox revision 1637.
More work on reducing graphics state change operations in the output. SVG is now mostly done, and the initial work is in place for PostScript. Because SVG is a nested format I can work out the graphics state deltas through a Reader monad (delta with the enclosing environment), with PostScript being linear I need to use a State monad (delta with the last object drawn).
More work on reducing graphics state change operations in the output. SVG is now mostly done, and the initial work is in place for PostScript. Because SVG is a nested format I can work out the graphics state deltas through a Reader monad (delta with the enclosing environment), with PostScript being linear I need to use a State monad (delta with the last object drawn).
Thursday, August 26, 2010
wumpus-fresh
Copperbox revision 1636.
Work on deltas to the graphics state for SVG output. I'm not sure that the code size savings in the SVG output will be that great, however the implementation method should at least be more straight-forward that the equivalent for PostScript in Wumpus-Core.
Work on deltas to the graphics state for SVG output. I'm not sure that the code size savings in the SVG output will be that great, however the implementation method should at least be more straight-forward that the equivalent for PostScript in Wumpus-Core.
wumpus-fresh
Copperbox revision 1635.
I've moved the colour data type RGB255 into a separate module. This is a prelude to working out how to manage the graphics state.
I've moved the colour data type RGB255 into a separate module. This is a prelude to working out how to manage the graphics state.
wumpus-fresh
Copperbox revision 1634.
Work on SVG output.
Most of the primitive functionality is now in place for Wumpus-Fresh. The work outstanding is designing a Picture type better suited to coordinate remapping, and working out how to minimize property setting code (e.g. for setlinewidth, findfont, etc.) in the PostScript and SVG output.
Work on SVG output.
Most of the primitive functionality is now in place for Wumpus-Fresh. The work outstanding is designing a Picture type better suited to coordinate remapping, and working out how to minimize property setting code (e.g. for setlinewidth, findfont, etc.) in the PostScript and SVG output.
Wednesday, August 25, 2010
wumpus-fresh
Copperbox revision 1633.
I've reworked the Format Combinators so they can generate XML.
Although I liked using XML-Light in Wumpus-Core, SVG has so much data encoded in strings that using formatters which handle both seems an advantage.
I've reworked the Format Combinators so they can generate XML.
Although I liked using XML-Light in Wumpus-Core, SVG has so much data encoded in strings that using formatters which handle both seems an advantage.
wumpus-fresh
Copperbox revision 1632.
Quite a bit of the PostScript output code is now in place, though I haven't thought about minimizing graphics state changes yet. Before I do that, I've started work on SVG output, then I'll be able to consider how I minimize graphics state changes for PostScript and SVG in tandem.
Quite a bit of the PostScript output code is now in place, though I haven't thought about minimizing graphics state changes yet. Before I do that, I've started work on SVG output, then I'll be able to consider how I minimize graphics state changes for PostScript and SVG in tandem.
wumpus-fresh
Copperbox revision 1631.
I've integrated more code from Wumpus-Core - the Primitive type now has all 3 primitives (Path, Ellipse, Text) and the TextEncoder code has been added.
I've integrated more code from Wumpus-Core - the Primitive type now has all 3 primitives (Path, Ellipse, Text) and the TextEncoder code has been added.
Tuesday, August 24, 2010
wumpus-fresh
Copperbox revision 1630.
More work on Wumpus-Fresh.
I've now started to work on PostScript output. This time I don't think I'm going to use a writer monad, although I'm not going to change the name Wumpus - (Writer Monad PostScript).
More work on Wumpus-Fresh.
I've now started to work on PostScript output. This time I don't think I'm going to use a writer monad, although I'm not going to change the name Wumpus - (Writer Monad PostScript).
wumpus-fresh
Copperbox revision 1629.
I've started a new fork of Wumpus-Core called Wumpus-Fresh.
With Wumpus-Fresh I want to look at a new Picture type that is hopefully easier to generate good SVG output from.
I've started a new fork of Wumpus-Core called Wumpus-Fresh.
With Wumpus-Fresh I want to look at a new Picture type that is hopefully easier to generate good SVG output from.
Monday, August 23, 2010
wumpus-core
Copperbox revision 1628.
More work on SVG rendering. The output is still not correct - rotated affine frames are wrong. Possible the rotation needs inverting, but I can't readily do this as inverting the matrix would also invert any scaling that had been applied.
It looks like the current implementation is not going to support the SVG optimizations - I'll have to think whether this means creating a new implementation that can be optimized or not bothering about the optimizations and reverting to last week's checkpoint.
More work on SVG rendering. The output is still not correct - rotated affine frames are wrong. Possible the rotation needs inverting, but I can't readily do this as inverting the matrix would also invert any scaling that had been applied.
It looks like the current implementation is not going to support the SVG optimizations - I'll have to think whether this means creating a new implementation that can be optimized or not bothering about the optimizations and reverting to last week's checkpoint.
Sunday, August 22, 2010
wumpus-core
Copperbox revision 1627.
I've reworked the SVG coordinate re-orientation algorithm, and it seems to be working as it should for nested affine frames. There some things still not working - rotating ellipses and text in the AffineTest examples. If I can't get them to work tomorrow, I'll probably revert the re-orientation code as it hasn't been a productive experience.
I've reworked the SVG coordinate re-orientation algorithm, and it seems to be working as it should for nested affine frames. There some things still not working - rotating ellipses and text in the AffineTest examples. If I can't get them to work tomorrow, I'll probably revert the re-orientation code as it hasn't been a productive experience.
wumpus-core
Copperbox revision 1626.
I've changed to track the range of Y values rather than height for the SVG coordinate re-orientation. Height would not combine with nested affine frames.
I've changed to track the range of Y values rather than height for the SVG coordinate re-orientation. Height would not combine with nested affine frames.
wumpus-core
Copperbox revision 1625.
More work on coordinate optimization for SVG. This commit is a slight improvement on the last one - frame height is moved into Locale in PictureInternal - though it still isn't working correctly and it needs some careful thought...
More work on coordinate optimization for SVG. This commit is a slight improvement on the last one - frame height is moved into Locale in PictureInternal - though it still isn't working correctly and it needs some careful thought...
Saturday, August 21, 2010
wumpus-core
Copperbox revision 1624.
Work on doing the SVG coordinate space change in the rendering, rather than send frame change operations to the SVG render.
If this were in place, it should make the output somewhat more efficient, but at the moment it is not right and I don't understand what I need to do (I've been guessing at combinations of matrix transformations for the last couple of hours...). Thus I might have to revert this change if I can't eventually get it to work.
Work on doing the SVG coordinate space change in the rendering, rather than send frame change operations to the SVG render.
If this were in place, it should make the output somewhat more efficient, but at the moment it is not right and I don't understand what I need to do (I've been guessing at combinations of matrix transformations for the last couple of hours...). Thus I might have to revert this change if I can't eventually get it to work.
Friday, August 20, 2010
wumpus-core
Copperbox revision 1623.
More tidying up of the SVG output code. I might now be in a position to look at reworking the coordinate transformation code for SVG.
SVG uses top-left as the origin whereas Wumpus and PostScript use bottom-right. In the SVG output I use an initial matrix transformation [1 0 0 -1 0 0] to change the orientation, then for text-labels I do an inverse transformation (otherwise they are displayed upside down).
I'm not sure how expensive this is for the renderer, but translating the coordinates at the generation stage will always be more efficient even if only slightly.
More tidying up of the SVG output code. I might now be in a position to look at reworking the coordinate transformation code for SVG.
SVG uses top-left as the origin whereas Wumpus and PostScript use bottom-right. In the SVG output I use an initial matrix transformation [1 0 0 -1 0 0] to change the orientation, then for text-labels I do an inverse transformation (otherwise they are displayed upside down).
I'm not sure how expensive this is for the renderer, but translating the coordinates at the generation stage will always be more efficient even if only slightly.
wumpus-core
Copperbox revision 1622.
More work tiding up SVG output. The code is still too ad hoc, but using HAttr has improved it quite a bit.
More work tiding up SVG output. The code is still too ad hoc, but using HAttr has improved it quite a bit.
wumpus-core
Copperbox revision 1621.
SVG output - I've changed the type of attributes to make them Hughes lists. This means they can be composed more easily and for the next commit I should be able to clean up quite a bit of code.
SVG output - I've changed the type of attributes to make them Hughes lists. This means they can be composed more easily and for the next commit I should be able to clean up quite a bit of code.
wumpus-core
Copperbox revision 1620.
I've tidied up the PostScript output code. Next step is to do the same for the SVG output code, which is has always been a lot messier.
I've tidied up the PostScript output code. Next step is to do the same for the SVG output code, which is has always been a lot messier.
Thursday, August 19, 2010
wumpus-core
Copperbox revision 1619.
I've handcoded the SvgMonad, rather than use a transformer stack.
I've handcoded the SvgMonad, rather than use a transformer stack.
wumpus-core
Copperbox revision 1618.
PostScript output - I've swapped the monad transformer stack for a handmade monad. This is a prelude to reworking the code in OutputPostScript. I'll do the same with the SVG output, which actually merits reworking more.
PostScript output - I've swapped the monad transformer stack for a handmade monad. This is a prelude to reworking the code in OutputPostScript. I'll do the same with the SVG output, which actually merits reworking more.
wumpus-core
Copperbox revision 1617.
I've re-worked the BoundingBox module, removing functions that didn't offer significant functionality. Plus I've renamed some other with longer names, bounding boxes seem quite secondary now, so I don't want to waste good short names on them.
I've re-worked the BoundingBox module, removing functions that didn't offer significant functionality. Plus I've renamed some other with longer names, bounding boxes seem quite secondary now, so I don't want to waste good short names on them.
wumpus-core
Copperbox revision 1616.
I've made Picture a rose tree again, rather than a binary tree. The last commit had two changes - the valuable change was making Leaf take a list of primitives, the change to a binary tree was mistake. Binary trees have more nesting in the output, thus generate larger files.
I've made Picture a rose tree again, rather than a binary tree. The last commit had two changes - the valuable change was making Leaf take a list of primitives, the change to a binary tree was mistake. Binary trees have more nesting in the output, thus generate larger files.
wumpus-core
Copperbox revision 1615.
I've corrected the SVG and PostScript output so that zorder works again. Also, I've added an example that tests zorder.
Note - the improvement in code size for SVG is quite good already, the dots picture in Wumpus-Basic goes from 40KB to 27KB. There is still quite a lot of work to be done though.
I've corrected the SVG and PostScript output so that zorder works again. Also, I've added an example that tests zorder.
Note - the improvement in code size for SVG is quite good already, the dots picture in Wumpus-Basic goes from 40KB to 27KB. There is still quite a lot of work to be done though.
wumpus-core
Copperbox revision 1614.
I've changed the Picture type to be a binary tree where the Leaf node holds a list of primitives. Previously it was a rose tree where the Leaf held a single primitive.
This should improve the efficiency of SVG output, as the generator can avoid creating extraneous 'g' element blocks. The changes will need quite a bit of testing, though.
I've changed the Picture type to be a binary tree where the Leaf node holds a list of primitives. Previously it was a rose tree where the Leaf held a single primitive.
This should improve the efficiency of SVG output, as the generator can avoid creating extraneous
wumpus-core
Copperbox revision 1613.
I've renamed the Single constructor to Leaf in the Picture datatype.
With hindsight, the Picture datatype is rather inadequate - it is biased towards many pictures (graphic within an affine frame) of single primitives (path, text) rather than few pictures of many primitives. In the PostScript output, the extra use of affine frames is optimized away as most of the frames are the identity frame; but for SVG, the output generates many 'g' blocks which is an extra layer of nesting.
Picture would be better as a binary tree, where Leaf is a list of Primitives and Picture is a binary node. I'm going to look at moving to this in the next round of work.
I've renamed the Single constructor to Leaf in the Picture datatype.
With hindsight, the Picture datatype is rather inadequate - it is biased towards many pictures (graphic within an affine frame) of single primitives (path, text) rather than few pictures of many primitives. In the PostScript output, the extra use of affine frames is optimized away as most of the frames are the identity frame; but for SVG, the output generates many 'g' blocks which is an extra layer of nesting.
Picture would be better as a binary tree, where Leaf is a list of Primitives and Picture is a binary node. I'm going to look at moving to this in the next round of work.
Wednesday, August 18, 2010
wumpus-core
Copperbox revision 1611.
Work on improving the pretty printer. Before I start work on optimizing the output from Wumpus-Core, it would be nice to be able to see what data I actually have...
Work on improving the pretty printer. Before I start work on optimizing the output from Wumpus-Core, it would be nice to be able to see what data I actually have...
Tuesday, August 17, 2010
wumpus-core
Copperbox revision 1610.
I've started work tidying up the internal code of Wumpus-Core with the intention of improving the efficiency of SVG text output as I go. For a first step, I've removed all the Data.Aviary style combinators.
I've started work tidying up the internal code of Wumpus-Core with the intention of improving the efficiency of SVG text output as I go. For a first step, I've removed all the Data.Aviary style combinators.
wumpus - new releases
Copperbox revision 1608 & 1609.
1608 - updates to changes and cabal files for prior to making new release archives.
1609 - new release archives:
wumpus-core-0.23.0
wumpus-basic-0.4.0
wumpus-microprint-0.4.0
wumpus-tree-0.3.0
1608 - updates to changes and cabal files for prior to making new release archives.
1609 - new release archives:
wumpus-core-0.23.0
wumpus-basic-0.4.0
wumpus-microprint-0.4.0
wumpus-tree-0.3.0
wumpus-microprint
Copperbox revision 1607.
I've done a bit of tidying up and added some Haddock docs.
I want to release new versions of Wumpus-Core and Wumpus-Basic to Hackage soon, otherwise the deltas will be huge. This means checking the dependent packages.
I've done a bit of tidying up and added some Haddock docs.
I want to release new versions of Wumpus-Core and Wumpus-Basic to Hackage soon, otherwise the deltas will be huge. This means checking the dependent packages.
wumpus-basic
Copperbox revision 1606.
I've added upper-case letters to the LRSymbol module, plus kerning to the LRText.
I've added upper-case letters to the LRSymbol module, plus kerning to the LRText.
wumpus-basic
Copperbox revision 1605.
I've added a module of named Greek letters to compliment the LRText module.
Unfortunately - it has alerted me to how inefficient text handling for SVG is in Wumpus-Core[*]. I'm not going to do anything about it in the short-term, but it will need work at some point.
[*] PostScript text handling isn't so bad, as there is an optimization in place to reduce calls to findfont.
I've added a module of named Greek letters to compliment the LRText module.
Unfortunately - it has alerted me to how inefficient text handling for SVG is in Wumpus-Core[*]. I'm not going to do anything about it in the short-term, but it will need work at some point.
[*] PostScript text handling isn't so bad, as there is an optimization in place to reduce calls to findfont.
Monday, August 16, 2010
wumpus-basic
Copperbox revision 1604.
I've fixed the bug in the text function that was wrongly calculating text widths. Also I've added functions for single char and newline.
One thing that this has made me aware of is that SVG white-space handling isn't addressed by Wumpus-Core. Double spaces won't get printed as Wumpus-Core never uses the space:'preserve' directive.
I've fixed the bug in the text function that was wrongly calculating text widths. Also I've added functions for single char and newline.
One thing that this has made me aware of is that SVG white-space handling isn't addressed by Wumpus-Core. Double spaces won't get printed as Wumpus-Core never uses the space:'preserve' directive.
wumpus-basic
Copperbox revision 1603.
Initial work on a monad for left-to-right text drawing. Hopefully this should allow multi-line text to be built relatively easily.
Initial work on a monad for left-to-right text drawing. Hopefully this should allow multi-line text to be built relatively easily.
wumpus-basic
Copperbox revision 1602.
Updates to Wumpus-Basic due to the FontAttr / FontFace changes in Wumpus-Core.
Plus I've added a Combinators module to Utils. Currently it has different arity starlings for updating records.
Updates to Wumpus-Basic due to the FontAttr / FontFace changes in Wumpus-Core.
Plus I've added a Combinators module to Utils. Currently it has different arity starlings for updating records.
wumpus-core
Copperbox revision 1601.
I've reworked the FontAttr data type to make the font face properties a separate data type.
As font face properties are somewhat impervious to modification - SVG and PS font names must match - it seems wise to have them separated from font size which might often need modifying in a drawing.
I've reworked the FontAttr data type to make the font face properties a separate data type.
As font face properties are somewhat impervious to modification - SVG and PS font names must match - it seems wise to have them separated from font size which might often need modifying in a drawing.
Sunday, August 15, 2010
wumpus
Copperbox revision 1600.
I've updated shapes according to the revised AGraphic type.
Also I've improved arrow drawing - the arrow angle and is taken as the direction of the path half the tip length back, not the full tip length back. This gives a better balance to the arrow tip.
I've updated shapes according to the revised AGraphic type.
Also I've improved arrow drawing - the arrow angle and is taken as the direction of the path half the tip length back, not the full tip length back. This gives a better balance to the arrow tip.
wumpus
Copperbox revision 1599.
Updated to Wumpus-Tree to work with the revised AGraphic type. Plus I've added a nodeAt function to Wumpus-Basic to draw a node at the argument point rather than the implicit point in the drawing model (e.g. the current point of Turtle).
Updated to Wumpus-Tree to work with the revised AGraphic type. Plus I've added a nodeAt function to Wumpus-Basic to draw a node at the argument point rather than the implicit point in the drawing model (e.g. the current point of Turtle).
wumpus-basic
Copperbox revision 1598.
I've changed AGraphic to be a dual representation rather than a dual representation + drawing attribute update function.
Dual representations were (probably) pioneered by Antony Courtney's Haven - an Image in Haven was both a function from Point -> Graphic (how to draw) and a function from Point -> Region (supporting point in polygon testing).
In Wumpus-Basic an AGraphic is essentially both a function from Point -> Graphic and a function from Point -> a where a might be a dot (supporting anchors) or a path (supporting midpoint). Actually it is a bit more complicated that this - a static param DrawingAttr (via a reader monad) is part of the type and Points might be ignored - a connector for instance isn't a function "from Point".
I've changed AGraphic to be a dual representation rather than a dual representation + drawing attribute update function.
Dual representations were (probably) pioneered by Antony Courtney's Haven - an Image in Haven was both a function from Point -> Graphic (how to draw) and a function from Point -> Region (supporting point in polygon testing).
In Wumpus-Basic an AGraphic is essentially both a function from Point -> Graphic and a function from Point -> a where a might be a dot (supporting anchors) or a path (supporting midpoint). Actually it is a bit more complicated that this - a static param DrawingAttr (via a reader monad) is part of the type and Points might be ignored - a connector for instance isn't a function "from Point".
wumpus-basic
Copperbox revision 1597.
I've changed the AGraphic type so that nodes and connectors are more uniform (there is no longer the AGraphic2 type).
I'll probably change the AGraphic type again with the next commit. It looks like embedding a modify function for DrawingAttr within the type is not going to be workable. Changing this will be no bad thing, the AGraphic type will then be more like the 'dual representation' types of Haven and Kansas Lava.
I've changed the AGraphic type so that nodes and connectors are more uniform (there is no longer the AGraphic2 type).
I'll probably change the AGraphic type again with the next commit. It looks like embedding a modify function for DrawingAttr within the type is not going to be workable. Changing this will be no bad thing, the AGraphic type will then be more like the 'dual representation' types of Haven and Kansas Lava.
wumpus
Copperbox revision 1596.
Wumpus-Basic - I've made the anchor dots the top level module for dots and moved the previous Basic.Dots module to Basic.Dots.Base. This is because anchor dots are at the right type for (monadic) Pictures.
This change has cascaded updates to Wumpus-Tree and Poor-Small-Chart.
Wumpus-Basic - I've made the anchor dots the top level module for dots and moved the previous Basic.Dots module to Basic.Dots.Base. This is because anchor dots are at the right type for (monadic) Pictures.
This change has cascaded updates to Wumpus-Tree and Poor-Small-Chart.
Saturday, August 14, 2010
wumpus-basic
Copperbox revision 1595.
All the arrows now decorated paths rather than draw straight lines with an arrow tip.
All the arrows now decorated paths rather than draw straight lines with an arrow tip.
wumpus-basic
Copperbox revision 1594.
I've changed the perpendicular arrow drawing to decorate a path rather than just a straight line.
Changing the other arrows will follow...
I've changed the perpendicular arrow drawing to decorate a path rather than just a straight line.
Changing the other arrows will follow...
wumpus-basic
Copperbox revision 1593.
Some work on paths and arrows.
I've removed the InnerSpace class constraint on the path construction functions. Also I've moved arrowheads into a directory for Arrows and renamed them Tips.
Some work on paths and arrows.
I've removed the InnerSpace class constraint on the path construction functions. Also I've moved arrowheads into a directory for Arrows and renamed them Tips.
wumpus-basic
Copperbox revision 1592.
I've added operations to take the end direction of a path, this is needed to draw arrow tips on paths.
I've added operations to take the end direction of a path, this is needed to draw arrow tips on paths.
Friday, August 13, 2010
wumpus-basic
Copperbox revision 1591.
I've implemented shortening for paths, which is essential for adding arrowheads to them.
I've implemented shortening for paths, which is essential for adding arrowheads to them.
wumpus-basic
Copperbox revision 1589.
Work on path construction.
Revision 1590 - putting in updates missed from last commit.
Work on path construction.
Revision 1590 - putting in updates missed from last commit.
Thursday, August 12, 2010
wumpus-basic
Copperbox revision 1588.
More work on arrows and paths. I've added a perpendicular arrow head, and put in the curve subdivision code from Wumpus version 1.
Getting the end tangent of a curve seems to be wrong in the path example, though.
More work on arrows and paths. I've added a perpendicular arrow head, and put in the curve subdivision code from Wumpus version 1.
Getting the end tangent of a curve seems to be wrong in the path example, though.
Wednesday, August 11, 2010
wumpus-basic
Copperbox revision 1586.
Initial work on a Path datatype for Wumpus-Basic.
Wumpus-Core has a path datatype, but this is too limited for drawings. For drawings its necessary to shorten paths - for good drawing of arrow heads; and there are other valuable operations that can't be done on the Core path type - finding the midpoint, finding the angle of the end segments. So a more sophisticated path type is needed.
Wumpus-Core - minor addition vdistance.
Initial work on a Path datatype for Wumpus-Basic.
Wumpus-Core has a path datatype, but this is too limited for drawings. For drawings its necessary to shorten paths - for good drawing of arrow heads; and there are other valuable operations that can't be done on the Core path type - finding the midpoint, finding the angle of the end segments. So a more sophisticated path type is needed.
Wumpus-Core - minor addition vdistance.
Tuesday, August 10, 2010
wumpus-basic
Copperbox revision 1583.
I've replaced the DrawingCtxMonad and TraceMonad with a new DrawingMonad. With the AGraphic type monadic drawing needs both tracing (writer) and drawing context (reader), so having one monad to do both is more efficient. I've made trace type specific to Graphic which is a Hughes list so supports efficient append.
The ConsDrawing monad has also been removed.
I've replaced the DrawingCtxMonad and TraceMonad with a new DrawingMonad. With the AGraphic type monadic drawing needs both tracing (writer) and drawing context (reader), so having one monad to do both is more efficient. I've made trace type specific to Graphic which is a Hughes list so supports efficient append.
The ConsDrawing monad has also been removed.
Monday, August 9, 2010
wumpus-basic
Copperbox revision 1582.
I've added arrow drawing for straight line connectors - i.e. objects of the AGraphic2 type. The code also manages retracting a point back along a line - this is needed for open stroked arrow heads.
Somewhere in the original Wumpus or in Wumpus-Extra I have code for working out the end angle of Bezier curve - its different to the angle to the control point if memory serves. I also have the code for retracting a point back along a curve - which is a variation of the de Casteljau algorithm.
I've added arrow drawing for straight line connectors - i.e. objects of the AGraphic2 type. The code also manages retracting a point back along a line - this is needed for open stroked arrow heads.
Somewhere in the original Wumpus or in Wumpus-Extra I have code for working out the end angle of Bezier curve - its different to the angle to the control point if memory serves. I also have the code for retracting a point back along a curve - which is a variation of the de Casteljau algorithm.
wumpus-shapes
Copperbox revision 1580.
Updated FreeLabel and Ellipse, so all shapes now use the AGraphic type.
Updated FreeLabel and Ellipse, so all shapes now use the AGraphic type.
Sunday, August 8, 2010
wumpus-shapes
Copperbox revision 1578.
I've made Rectangle and Coordinate work with the new AGraphic type.
I've made Rectangle and Coordinate work with the new AGraphic type.
wumpus-tree
Copperbox revision 1577.
Updated to use AGraphic rather than the out-moded MGraphicF type.
Updated to use AGraphic rather than the out-moded MGraphicF type.
wumpus-core
Copperbox revision 1574.
I've added a distinct PtSize numeric type for text and font size calculations.
This will make things more manageable if I add say a centimetre type for drawing unit to Wumpus-Basic as conversions will now be explicit.
I've added a distinct PtSize numeric type for text and font size calculations.
This will make things more manageable if I add say a centimetre type for drawing unit to Wumpus-Basic as conversions will now be explicit.
Saturday, August 7, 2010
wumpus-basic
Copperbox revision 1573.
I've removed the SnocDrawing and STrace moands from Wumpus-basic.
Having two versions (cons and snoc) with a single trace operation is actually not useful in practice as they produce different output with respect to the Z-order.
Wumpus-Tree has been updated to use ConsDrawing instead of SnocDrawing.
I've removed the SnocDrawing and STrace moands from Wumpus-basic.
Having two versions (cons and snoc) with a single trace operation is actually not useful in practice as they produce different output with respect to the Z-order.
Wumpus-Tree has been updated to use ConsDrawing instead of SnocDrawing.
Friday, August 6, 2010
Wumpus release tar-balls
Copperbox revision 1572.
Added release tar balls for:
wumpus-core-0.22.0
wumpus-basic-0.3.0
wumpus-microprint-0.3.0
wumpus-tree-0.1.0
Copperbox revision 1571.
Edits to Wumpus-Basic to use PictureLanguage which is now under a different module name space. Updates to Wumpus-Microprint and Wumpus-Tree.
Added release tar balls for:
wumpus-core-0.22.0
wumpus-basic-0.3.0
wumpus-microprint-0.3.0
wumpus-tree-0.1.0
Copperbox revision 1571.
Edits to Wumpus-Basic to use PictureLanguage which is now under a different module name space. Updates to Wumpus-Microprint and Wumpus-Tree.
wumpus-basic
Copperbox revision 1570.
Added the PictureLanguage module from Wumpus-Core. It can sit in the Wumpus.Deprecated module name-space until I decide what to do with it.
Added the PictureLanguage module from Wumpus-Core. It can sit in the Wumpus.Deprecated module name-space until I decide what to do with it.
wumpus-core
Copperbox revision 1569.
Changes prior to a new release.
I've removed the Wumpus.Extra.PictureLanguage module - it is now in the Wumpus-Basic package. Updated the manual and changelog to notify this.
Changes prior to a new release.
I've removed the Wumpus.Extra.PictureLanguage module - it is now in the Wumpus-Basic package. Updated the manual and changelog to notify this.
Thursday, August 5, 2010
wumpus-basic
Copperbox revision 1567.
I've added cross instances of the other monad classes for each of the transformers - i.e. TurtleT has instances of DrawingCtxM and TraceM.
Edit - revision 1568 - some tidying up.
I've added cross instances of the other monad classes for each of the transformers - i.e. TurtleT has instances of DrawingCtxM and TraceM.
Edit - revision 1568 - some tidying up.
wumpus
Copperbox revision 1565.
Work on making node drawing configurable for Wumpus-Tree.
I've also added an analogue of the Reader monads local to the DrawingCtx monad, so that drawing properties like fill colour can be changed on the fly.
Note to self - I need to add cross instances for the transformers in Basic.Monads. I've added a DrawingCtxM instance for the Turtle transformer, but I need to do the other transformers and classes.
Work on making node drawing configurable for Wumpus-Tree.
I've also added an analogue of the Reader monads local to the DrawingCtx monad, so that drawing properties like fill colour can be changed on the fly.
Note to self - I need to add cross instances for the transformers in Basic.Monads. I've added a DrawingCtxM instance for the Turtle transformer, but I need to do the other transformers and classes.
wumpus-tree
Copperbox revision 1564.
Work towards making Wumpus-Tree a usable package, albeit a limited one. I've re-worked the modules so that it is friendly to a single import, configuring how nodes are draw is still to-do.
Work towards making Wumpus-Tree a usable package, albeit a limited one. I've re-worked the modules so that it is friendly to a single import, configuring how nodes are draw is still to-do.
wumpus-basic
Copperbox revision 1563.
All anchor dots changed to return the existential DotAnchor type. DotAnchor is an opaque type that supports the Anchor classes.
All anchor dots changed to return the existential DotAnchor type. DotAnchor is an opaque type that supports the Anchor classes.
Wednesday, August 4, 2010
wumpus
Copperbox revision 1562.
Updates to Wumpus-Basic and Wumpus-Tree. Tree drawing to now uses radial anchors - this means nodes no longer need be opaque.
In Wumpus-Basic, I'm experimenting with existential anchors again. I didn't really like the previous design where dots could return differently typed objects that only supported taking anchors. The new experiment uses existentials again to get all anchors at the same type, but is a bit nicer than previous ones.
Updates to Wumpus-Basic and Wumpus-Tree. Tree drawing to now uses radial anchors - this means nodes no longer need be opaque.
In Wumpus-Basic, I'm experimenting with existential anchors again. I didn't really like the previous design where dots could return differently typed objects that only supported taking anchors. The new experiment uses existentials again to get all anchors at the same type, but is a bit nicer than previous ones.
wumpus-basic
Copperbox revision 1561.
I've changed the Turtle monad to use a explicit integer coordinate again. Also I've added origin to the state, this will help handling drawings that use next line as it gives a means to keep coordinates in the y-axis above zero.
I've changed the Turtle monad to use a explicit integer coordinate again. Also I've added origin to the state, this will help handling drawings that use next line as it gives a means to keep coordinates in the y-axis above zero.
Tuesday, August 3, 2010
wumpus-basic
Copperbox revision 1559.
I've added a new example MonadicDraw which stitches together today's work. Particularly monadic drawing allows binding anchors to variables, so drawings with nicely placed connectors are finally possible.
I've added a new example MonadicDraw which stitches together today's work. Particularly monadic drawing allows binding anchors to variables, so drawings with nicely placed connectors are finally possible.
wumpus-basic
Copperbox revision 1558.
I've added a module Drawing for monadic drawing operations that use combinations of the TraceM, DrawingCtxM and TurtleM class functions.
I've added a module Drawing for monadic drawing operations that use combinations of the TraceM, DrawingCtxM and TurtleM class functions.
wumpus-basic
Copperbox revision 1557.
I've moved the monad classes (TraceM, DrawingCtxM, TurtleM) into their own modules.
This will make it easier for amalgamated modules like SnocDrawing to export the relevant operations.
I've moved the monad classes (TraceM, DrawingCtxM, TurtleM) into their own modules.
This will make it easier for amalgamated modules like SnocDrawing to export the relevant operations.
wumpus-basic
Copperbox revision 1556.
Added a SnocDrawing monad.
This is an amalgamated monad like RWS - here it amalgamates SnocTrace, DrawingCtx and Turtle.
Added a SnocDrawing monad.
This is an amalgamated monad like RWS - here it amalgamates SnocTrace, DrawingCtx and Turtle.
wumpus-basic
Copperbox revision 1555.
Added a Drawing Context monad - a reader monad with DrawingAttr for the environment.
Added a Drawing Context monad - a reader monad with DrawingAttr for the environment.
wumpus-basic
Copperbox revision 1554.
I've changed the Turtle monad to use picture coordinates (i.e. Point2 u) rather than an integer coordinates that get rescaled to picture coordinates after construction.
This change makes sense for taking anchors on shapes and similar operations which need a proper coordinate.
I've changed the Turtle monad to use picture coordinates (i.e. Point2 u) rather than an integer coordinates that get rescaled to picture coordinates after construction.
This change makes sense for taking anchors on shapes and similar operations which need a proper coordinate.
wumpus-basic
Copperbox revision 1553.
I've moved the MarkAttr data type into its own module Basic.Graphic.DrawingAttr where it is renamed DrawingAttr.
I've moved the MarkAttr data type into its own module Basic.Graphic.DrawingAttr where it is renamed DrawingAttr.
Monday, August 2, 2010
wumpus-basic
Copperbox revision 1552.
Another formulated or anchor dots. This time they are monadic so I can bind the anchor.
Another formulated or anchor dots. This time they are monadic so I can bind the anchor.
wumpus-basic
Copperbox revision 1551.
Check-pointing the first prototype of dots with anchors - which are needed for drawing trees, etc.
This version makes heavy use of GHC extensions to encode different dots with different anchor calculations at the same existential type. I'll most likely change it so that anchor-dots can be of different types, but support a common class for drawing like the shapes in Wumpus-Shapes.
Check-pointing the first prototype of dots with anchors - which are needed for drawing trees, etc.
This version makes heavy use of GHC extensions to encode different dots with different anchor calculations at the same existential type. I'll most likely change it so that anchor-dots can be of different types, but support a common class for drawing like the shapes in Wumpus-Shapes.
Sunday, August 1, 2010
wumpus-shapes
Copperbox revision 1550.
I've updated the shapes library to use the new names for the Anchor classes.
I've updated the shapes library to use the new names for the Anchor classes.
wumpus-basic
Copperbox revision 1548.
I've sorted out the quadrant problem with the intersection code.
Also I've changed the names of the Anchor type classes so they read better.
I've sorted out the quadrant problem with the intersection code.
Also I've changed the names of the Anchor type classes so they read better.
wumpus-basic
Copperbox revision 1547.
A better prototype than yesterday's effort to find the intersection of a point and a plane (and hence a calculate radial anchors).
Today's version has a problem though - because it finds the intersection of a line segment and a plane it is insensitive to the "correct" quadrant. E.g. the plane for the east and west anchors is the same - the horizontal plane - and polygon crosses the horizontal plane at both east and west. Calculating "west" actually finds east because of the search order of the polygon's line segments.
A better prototype than yesterday's effort to find the intersection of a point and a plane (and hence a calculate radial anchors).
Today's version has a problem though - because it finds the intersection of a line segment and a plane it is insensitive to the "correct" quadrant. E.g. the plane for the east and west anchors is the same - the horizontal plane - and polygon crosses the horizontal plane at both east and west. Calculating "west" actually finds east because of the search order of the polygon's line segments.
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2010
(890)
-
▼
August
(105)
- wumpus-core
- wumpus-core
- wumpus-fresh / wumpus-core
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-fresh
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus-core
- wumpus - new releases
- wumpus-microprint
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-core
- wumpus
- wumpus
- wumpus-basic
- wumpus-basic
- wumpus
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus
- wumpus
- wumpus-basic
- wumpus-basic
- wumpus
- wumpus-shapes
- wumpus-shapes
- wumpus-shapes
- wumpus-tree
- wumpus-basic
- wumpus
- wumpus-core
- wumpus-basic
- Wumpus release tar-balls
- wumpus-basic
- wumpus-core
- wumpus-basic
- wumpus
- wumpus
- wumpus-tree
- wumpus-basic
- wumpus
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
- wumpus-basic
-
▼
August
(105)
About Me
- Stephen Tetley
- 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.