hgeometry- Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone




_asLineSegment :: Prism' (Path r) (LineSegment 2 () r) Source

Try to convert a path into a line segment, fails if the path is not a line segment or a polyline with more than two points.

_asPolyLine :: Prism' (Path r) (PolyLine 2 () r) Source

Convert to a polyline. Ignores all non-polyline parts

_asSimplePolygon :: Prism' (Path r) (SimplePolygon () r) Source

Convert to a simple polygon: simply takes the first closed path

_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r) Source

use the first prism to select the ipe object to depicle with, and the second how to select the geometry object from there on. Then we can select the geometry object, directly with its attributes here.