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

Safe HaskellNone





newtype IpeOut g i Source

An IpeOut is essentially a funciton to convert a geometry object of type g into an ipe object of type i.




asIpe :: g -> i


asIpeObject :: (HasDefaultIpeOut g, DefaultIpeOut g ~ i, NumType g ~ r) => g -> IpeAttributes i r -> IpeObject r Source

Given an geometry object, and a record with its attributes, construct an ipe Object representing it using the default conversion.

asIpeObject' :: (HasDefaultIpeOut g, DefaultIpeOut g ~ i, NumType g ~ r) => IpeAttributes i r -> g -> IpeObject r Source

asIpeObject with its arguments flipped. Convenient if you don't want to map asIpeObject over a list or so.

asIpeGroup :: [IpeObject r] -> IpeObject r Source

Create an ipe group without group attributes

asIpeGroup' :: [IpeObject r] -> IpeAttributes Group r -> IpeObject r Source

Creates a group out of ipe

ipeObject :: (ToObject i, NumType g ~ r) => IpeOut g (IpeObject' i r) -> IpeAttributes i r -> IpeOut g (IpeObject r) Source

Helper to construct an IpeOut g IpeObject , if we already know how to construct a specific Ipe type.

coreOut :: IpeOut g i -> IpeOut (g :+ a) i Source

Construct an ipe object from the core of an Ext

Default Conversions

class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where Source

Class that specifies a default conversion from a geometry type g into an ipe object.

Associated Types

type DefaultIpeOut g :: * -> * Source

Point Converters

noAttrs :: Monoid extra => IpeOut g core -> IpeOut g (core :+ extra) Source

addAttributes :: extra -> IpeOut g core -> IpeOut g (core :+ extra) Source

defaultClipRectangle :: (Num r, Ord r) => Rectangle () r Source

Default size of the cliping rectangle used to clip lines. This is Rectangle is large enough to cover the normal page size in ipe.

fromPathSegment :: IpeOut g (PathSegment r) -> IpeOut g (Path r) Source

Helper to construct a IpeOut g Path, for when we already have an IpeOut g PathSegment