hgeometry-0.7.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 # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

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 # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

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

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

HasDefaultIpeOut (SomePolygon p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

HasDefaultIpeOut (ConvexPolygon p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

HasDefaultIpeOut (LineSegment 2 p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

HasDefaultIpeOut (PolyLine 2 p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

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

HasDefaultIpeOut (Polygon t p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.IpeOut

Associated Types

type DefaultIpeOut (Polygon t 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.

line :: (Fractional r, Ord r) => IpeOut (Line 2 r) (IpeObject' Path r) Source #

An ipe out to draw a line, by clipping it to stay within a rectangle of default size.

lineWith :: forall p r. (Ord r, Fractional r) => Rectangle p r -> IpeOut (Line 2 r) (IpeObject' Path r) Source #

An ipe out to draw a line, by clipping it to stay within the rectangle.

pre: intersection of the line and the rectangle is a line segment (otherwise it arbitrarily inserts the bottom of the rectangle as the path)

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