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

Synopsis

Given a file path, tries to read an ipe file

Given a file path, tries to read an ipe file. This function applies all matrices to objects.

Since most Ipe file contain only one page, we provide a shortcut for that as well. This function applies all matrices.

fromIpeXML :: (Coordinate r, IpeRead (t r)) => ByteString -> Either ConversionError (t r) Source

Given a Bytestring, try to parse the bytestring into anything that is IpeReadable, i.e. any of the Ipe elements.

Reads the data from a Bytestring into a proper Node

Reading an ipe elemtn from a Text value

Methods

Instances

 Source Source Source Source Source Source Source Source Source Source Coordinate r => IpeReadText (IpeDash r) Source Coordinate r => IpeReadText (IpePen r) Source Coordinate r => IpeReadText (IpeSize r) Source Coordinate r => IpeReadText (Path r) Source Coordinate r => IpeReadText (Point 2 r) Source Coordinate r => IpeReadText (Rectangle () r) Source Coordinate r => IpeReadText (Matrix 3 3 r) Source Coordinate r => IpeReadText (PolyLine 2 () r) Source

Reading an ipe lement from Xml

Methods

Instances

Basically IpeReadText for attributes. This class is not really meant to be implemented directly. Just define an IpeReadText instance for the type (Apply f at), then the generic instance below takes care of looking up the name of the attribute, and calling the right ipeReadText value. This class is just so that reifyConstraint in `ipeReadRec` can select the right typeclass when building the rec.

Methods

Instances

 IpeReadText (Apply * k f at) => IpeReadAttr (Attr k f at) Source

# Some low level implementation functions

ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllSatisfy IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r) Source