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

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Ipe.IpeOut

Contents

Synopsis

Documentation

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.

Constructors

IpeOut 

Fields

Instances

Functor (IpeOut g) Source # 

Methods

fmap :: (a -> b) -> IpeOut g a -> IpeOut g b #

(<$) :: a -> IpeOut g b -> IpeOut g a #

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.

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.

Minimal complete definition

defaultIpeOut

Associated Types

type DefaultIpeOut g :: * -> * Source #

Instances

HasDefaultIpeOut (Point 2 r) Source # 

Associated Types

type DefaultIpeOut (Point 2 r) :: * -> * Source #

Floating r => HasDefaultIpeOut (Disk p r) Source # 

Associated Types

type DefaultIpeOut (Disk p r) :: * -> * Source #

HasDefaultIpeOut (SimplePolygon p r) Source # 
HasDefaultIpeOut (ConvexPolygon p r) Source # 
HasDefaultIpeOut (LineSegment 2 p r) Source # 

Associated Types

type DefaultIpeOut (LineSegment 2 p r) :: * -> * Source #

HasDefaultIpeOut (PolyLine 2 p r) Source # 

Associated Types

type DefaultIpeOut (PolyLine 2 p r) :: * -> * 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