Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype IpeOut g i = IpeOut {
- asIpe :: g -> i
- asIpeObject :: (HasDefaultIpeOut g, DefaultIpeOut g ~ i, NumType g ~ r) => g -> IpeAttributes i r -> IpeObject r
- asIpeObject' :: (HasDefaultIpeOut g, DefaultIpeOut g ~ i, NumType g ~ r) => IpeAttributes i r -> g -> IpeObject r
- asIpeObjectWith :: (ToObject i, NumType g ~ r) => IpeOut g (IpeObject' i r) -> g -> IpeAttributes i r -> IpeObject r
- asIpeGroup :: [IpeObject r] -> IpeObject r
- asIpeGroup' :: [IpeObject r] -> IpeAttributes Group r -> IpeObject r
- ipeObject :: (ToObject i, NumType g ~ r) => IpeOut g (IpeObject' i r) -> IpeAttributes i r -> IpeOut g (IpeObject r)
- coreOut :: IpeOut g i -> IpeOut (g :+ a) i
- class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where
- type DefaultIpeOut g :: * -> *
- ipeMark :: Text -> IpeOut (Point 2 r) (IpeObject' IpeSymbol r)
- ipeDiskMark :: IpeOut (Point 2 r) (IpeObject' IpeSymbol r)
- noAttrs :: Monoid extra => IpeOut g core -> IpeOut g (core :+ extra)
- addAttributes :: extra -> IpeOut g core -> IpeOut g (core :+ extra)
- defaultClipRectangle :: (Num r, Ord r) => Rectangle () r
- ipeLineSegment :: IpeOut (LineSegment 2 p r) (IpeObject' Path r)
- ipeLineSegment' :: IpeOut (LineSegment 2 p r) (PathSegment r)
- ipePolyLine :: IpeOut (PolyLine 2 p r) (Path r)
- ipePolyLine' :: IpeOut (PolyLine 2 a r) (PathSegment r)
- ipeDisk :: Floating r => IpeOut (Disk p r) (IpeObject' Path r)
- ipeCircle :: Floating r => IpeOut (Circle p r) (Path r)
- ipeCircle' :: Floating r => IpeOut (Circle p r) (PathSegment r)
- fromPathSegment :: IpeOut g (PathSegment r) -> IpeOut g (Path r)
- ipeSimplePolygon :: IpeOut (SimplePolygon p r) (Path r)
Documentation
An IpeOut is essentially a funciton to convert a geometry object of type
g
into an ipe object of type 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.
asIpeObjectWith :: (ToObject i, NumType g ~ r) => IpeOut g (IpeObject' i r) -> g -> IpeAttributes i r -> IpeObject r Source #
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.
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.
type DefaultIpeOut g :: * -> * Source #
defaultIpeOut :: IpeOut g (IpeObject' (DefaultIpeOut g) (NumType g)) Source #
HasDefaultIpeOut (Point 2 r) Source # | |
Floating r => HasDefaultIpeOut (Disk p r) Source # | |
HasDefaultIpeOut (SimplePolygon p r) Source # | |
HasDefaultIpeOut (ConvexPolygon p r) Source # | |
HasDefaultIpeOut (LineSegment 2 p r) Source # | |
HasDefaultIpeOut (PolyLine 2 p r) Source # | |
Point Converters
ipeDiskMark :: IpeOut (Point 2 r) (IpeObject' IpeSymbol r) 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.
ipeLineSegment :: IpeOut (LineSegment 2 p r) (IpeObject' Path r) Source #
ipeLineSegment' :: IpeOut (LineSegment 2 p r) (PathSegment r) Source #
ipePolyLine' :: IpeOut (PolyLine 2 a r) (PathSegment r) Source #
ipeCircle' :: Floating r => IpeOut (Circle p r) (PathSegment r) Source #
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
ipeSimplePolygon :: IpeOut (SimplePolygon p r) (Path r) Source #