Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- writeIpeFile :: IpeWriteText r => FilePath -> IpeFile r -> IO ()
- writeIpePage :: IpeWriteText r => FilePath -> IpePage r -> IO ()
- printAsIpeSelection :: IpeWrite t => t -> IO ()
- toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString
- toIpeXML :: IpeWrite t => t -> Maybe ByteString
- writeIpeFile' :: IpeWrite t => t -> FilePath -> IO ()
- class IpeWriteText t where
- class IpeWrite t where
- ipeWriteAttrs :: (AllSatisfy IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]
- writeAttrValues :: RecAll f rs IpeWriteText => Rec f rs -> Rec (Const (Maybe Text)) rs
- addAtts :: Node Text Text -> [(Text, Text)] -> Node Text Text
- mAddAtts :: Maybe (Node Text Text) -> [(Text, Text)] -> Maybe (Node Text Text)
- writeByShow :: Show t => t -> Maybe Text
- unwords' :: [Maybe Text] -> Maybe Text
- unlines' :: [Maybe Text] -> Maybe Text
- ipeWriteRec :: RecAll f rs IpeWrite => Rec f rs -> [Node Text Text]
- fromPolyLine :: PolyLine 2 () r -> Path r
- combine :: [Node Text Text] -> Maybe (Node Text Text)
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.
writeIpePage :: IpeWriteText r => FilePath -> IpePage r -> IO () Source #
Creates a single page ipe file with the given page
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.
writeIpeFile' :: IpeWrite t => t -> FilePath -> IO () Source #
Convert to ipe XML and write the output to a file.
class IpeWriteText t where Source #
For types that can produce a text value
ipeWriteText :: t -> Maybe Text Source #
Instances
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.
Instances
IpeWrite () Source # | |
IpeWrite LayerName Source # | |
IpeWrite View Source # | |
IpeWrite IpeStyle Source # | |
IpeWrite IpePreamble Source # | |
Defined in Data.Geometry.Ipe.Writer | |
IpeWriteText r => IpeWrite (Image r) Source # | |
IpeWriteText r => IpeWrite (IpeSymbol r) Source # | |
IpeWriteText r => IpeWrite (MiniPage r) Source # | |
IpeWriteText r => IpeWrite (TextLabel r) Source # | |
IpeWriteText r => IpeWrite (Path r) Source # | |
IpeWriteText r => IpeWrite (IpeObject r) Source # | |
IpeWriteText r => IpeWrite (Group r) Source # | |
IpeWriteText r => IpeWrite (IpePage r) Source # | |
IpeWriteText r => IpeWrite (IpeFile r) Source # | |
(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # | |
(AllSatisfy IpeAttrName rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
IpeWriteText r => IpeWrite (LineSegment 2 p r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
(IpeWriteText r, IpeWrite p) => IpeWrite (PolyLine 2 p r) Source # | |
ipeWriteAttrs :: (AllSatisfy IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] Source #
Functon to write all attributes in a Rec
writeAttrValues :: RecAll f rs IpeWriteText => Rec f rs -> Rec (Const (Maybe Text)) rs Source #
Writing the attribute values
mAddAtts :: Maybe (Node Text Text) -> [(Text, Text)] -> Maybe (Node Text Text) Source #
Same as addAtts
but then for a Maybe node
fromPolyLine :: PolyLine 2 () r -> Path r Source #