hgeometry-ipe-0.11.0.0: Reading and Writing ipe7 files.

Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Ipe.Writer

Description

Description : Converting data types into IpeTypes

Synopsis

Documentation

writeIpeFile :: IpeWriteText r => FilePath -> IpeFile r -> IO () Source #

Given a prism to convert something of type g into an ipe file, a file path, and a g. Convert the geometry and write it to file.

Write an IpeFiele to file.

writeIpeFile' :: IpeWrite t => t -> FilePath -> IO () Source #

Convert to ipe XML and write the output to a file.

writeIpePage :: IpeWriteText r => FilePath -> IpePage r -> IO () Source #

Creates a single page ipe file with the given page

toIpeXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert to Ipe xml

printAsIpeSelection :: IpeWrite t => t -> IO () Source #

Convert the input to ipeXml, and prints it to standard out in such a way that the copied text can be pasted into ipe as a geometry object.

toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert input into an ipe selection.

class IpeWrite t where Source #

Types that correspond to an XML Element. All instances should produce an Element. If the type should produce a Node with the Text constructor, use the IpeWriteText typeclass instead.

Methods

ipeWrite :: t -> Maybe (Node Text Text) Source #

Instances
IpeWrite () Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: () -> Maybe (Node Text Text) Source #

IpeWrite LayerName Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWrite View Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWrite IpeStyle Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWrite IpePreamble Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWrite t => IpeWrite [t] Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: [t] -> Maybe (Node Text Text) Source #

IpeWrite t => IpeWrite (NonEmpty t) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: Either l r -> Maybe (Node Text Text) Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

(IpeWriteText r, IpeWrite p) => IpeWrite (PolyLine 2 p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWrite :: PolyLine 2 p r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (LineSegment 2 p r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

class IpeWriteText t where Source #

For types that can produce a text value

Methods

ipeWriteText :: t -> Maybe Text Source #

Instances
IpeWriteText Double Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText Float Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText Int Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText Integer Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText () Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: () -> Maybe Text Source #

IpeWriteText String Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText Text Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText FillType Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText PinType Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Integral a => IpeWriteText (Ratio a) Source #

This instance converts the ratio to a Pico, and then displays that.

Instance details

Defined in Data.Geometry.Ipe.Writer

HasResolution p => IpeWriteText (Fixed p) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (RGB r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText (RealNumber p) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

(IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (Point 2 r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: Point 2 r -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Polygon t () r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: Polygon t () r -> Maybe Text Source #

IpeWriteText r => IpeWriteText (BezierSpline 3 2 r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

IpeWriteText r => IpeWriteText (PolyLine 2 () r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: PolyLine 2 () r -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Matrix 3 3 r) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: Matrix 3 3 r -> Maybe Text Source #

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Data.Geometry.Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] Source #

Functon to write all attributes in a Rec

writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs Source #

Writing the attribute values