-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Read/write DVI and TFM file -- -- Read/write DVI and TFM file, including typesetting and other features @package dvi-processing @version 0.3 module Graphics.DVI type PageObjects = [(Coordinates, PageObject)] data Page Page :: PageNumbers -> PageObjects -> DocStat -> Page pageNumbers :: Page -> PageNumbers pageObjects :: Page -> PageObjects pageStat :: Page -> DocStat type PageNumbers = (Word32, Word32, Word32, Word32, Word32, Word32, Word32, Word32, Word32, Word32) class PageNumberClass t pageNum :: PageNumberClass t => t -> PageNumbers data DocStat DocStat :: Maybe Handle -> Maybe Word32 -> [Font] -> Dimen -> Dimen -> Word16 -> Word16 -> Word32 -> Ratio Word32 -> DocStat pageHandle :: DocStat -> Maybe Handle prevPage :: DocStat -> Maybe Word32 fonts :: DocStat -> [Font] tallest :: DocStat -> Dimen widest :: DocStat -> Dimen maxStackDepth :: DocStat -> Word16 numPages :: DocStat -> Word16 magnification :: DocStat -> Word32 dviUnits :: DocStat -> Ratio Word32 docStat :: DocStat type Coordinates = (Dimen, Dimen) data PageObject Special :: ByteString -> PageObjects -> PageObject Box :: PageObjects -> PageObject Character :: Font -> Word32 -> PageObject Text :: Font -> TextString -> PageObject Rule :: Dimen -> Dimen -> PageObject DVI_Binary :: ByteString -> PageObject type TextString = [Either Dimen Word32] dviUnitsTeX :: Ratio Word32 withBoxes :: (PageObjects -> PageObjects) -> PageObjects -> PageObjects withInnerBoxes :: (PageObjects -> PageObjects) -> PageObjects -> PageObjects shiftPage :: Coordinates -> PageObjects -> PageObjects unshiftPage :: Coordinates -> PageObjects -> PageObjects sortPage :: PageObjects -> PageObjects unboxPage :: PageObjects -> PageObjects textToChar :: PageObjects -> PageObjects openSpecials :: (ByteString -> Bool) -> PageObjects -> PageObjects splitSpecials :: (ByteString -> ByteString -> Bool) -> PageObjects -> PageObjects closeSpecials :: (ByteString -> Bool) -> PageObjects -> PageObjects maybeSpecial :: (Coordinates, PageObject) -> Maybe ByteString objWidth :: PageObject -> Dimen objHeight :: PageObject -> Dimen objDepth :: PageObject -> Dimen points :: Ratio Int32 -> Int32 picas :: Ratio Int32 -> Int32 centimetres :: Ratio Int32 -> Int32 millimetres :: Ratio Int32 -> Int32 bigPoints :: Ratio Int32 -> Int32 didot :: Ratio Int32 -> Int32 cicero :: Ratio Int32 -> Int32 inches :: Ratio Int32 -> Int32 data Font Font :: ByteString -> Word32 -> Word32 -> Word32 -> [Dimen] -> Word8 -> [LigKern] -> Maybe Word8 -> [FontChar] -> Font fontName :: Font -> ByteString fontChecksum :: Font -> Word32 atSize :: Font -> Word32 designSize :: Font -> Word32 fontDimen :: Font -> [Dimen] firstChar :: Font -> Word8 leftBoundChar :: Font -> [LigKern] rightBoundChar :: Font -> Maybe Word8 characters :: Font -> [FontChar] data FontChar FontChar :: Dimen -> Dimen -> Dimen -> Dimen -> Maybe Word8 -> [LigKern] -> Maybe Extensible -> FontChar charWidth :: FontChar -> Dimen charHeight :: FontChar -> Dimen charDepth :: FontChar -> Dimen charItalCorr :: FontChar -> Dimen charLarger :: FontChar -> Maybe Word8 charLigKern :: FontChar -> [LigKern] charExten :: FontChar -> Maybe Extensible data LigKern Kerning :: Word8 -> Dimen -> LigKern lkChar :: LigKern -> Word8 kernDist :: LigKern -> Dimen Ligature :: Word8 -> Word8 -> Int -> LigKern lkChar :: LigKern -> Word8 ligChar :: LigKern -> Word8 ligCode :: LigKern -> Int data Extensible Extensible :: Word8 -> Word8 -> Word8 -> Word8 -> Extensible extTop :: Extensible -> Word8 extMid :: Extensible -> Word8 extBot :: Extensible -> Word8 extRep :: Extensible -> Word8 emptyFont :: Font fontEq :: Font -> Font -> Bool type FontMag = Either Int Word32 loadFont :: FontMag -> FilePath -> IO Font readFont :: ByteString -> FontMag -> Handle -> IO Font getFontChar :: (Integral t, Bits t) => Font -> t -> Maybe FontChar findLK :: [LigKern] -> Word8 -> Maybe LigKern widestChar :: Font -> Int32 withDVI :: FilePath -> (Word32 -> ByteString -> IO Font) -> s -> (s -> Page -> IO (Maybe (s, t))) -> IO [t] createDVI :: FilePath -> Word32 -> Ratio Word32 -> IO DocStat shipOut :: Page -> IO DocStat finishDVI :: DocStat -> IO () singlePageDocument :: Node -> FilePath -> IO () data Glue Glue :: Dimen -> GlueSS -> GlueSS -> Glue naturalGlue :: Glue -> Dimen stretchability :: Glue -> GlueSS shrinkability :: Glue -> GlueSS data GlueSS GlueSS :: Dimen -> Dimen -> Dimen -> Dimen -> GlueSS finiteSS :: GlueSS -> Dimen filSS :: GlueSS -> Dimen fillSS :: GlueSS -> Dimen filllSS :: GlueSS -> Dimen data GlueRank Finite :: GlueRank Fil :: GlueRank Fill :: GlueRank Filll :: GlueRank data GlueSet GlueSet :: (Ratio Dimen) -> GlueRank -> GlueSign -> GlueSet data GlueSign Shrinking :: GlueSign Stretching :: GlueSign spaceGlue :: Font -> Int -> Glue fixedGlue :: Dimen -> Glue nullGlueSS :: GlueSS addGlue :: Glue -> Glue -> Glue subtractGlue :: Glue -> Glue -> Glue badness :: Dimen -> Glue -> Ratio Integer type Dimen = Int32 type RenderPos = Double toRenderPos :: Real x => x -> RenderPos calcGlue :: GlueSet -> Glue -> RenderPos calcGlueSet :: Dimen -> Glue -> GlueSet selectGlueSS :: GlueRank -> GlueSS -> Dimen data Node Node :: x -> Node class Typeable x => NodeClass x where showNode _ = "Node;" hRender x _ y = ([], y + toRenderPos (nodeWidth x)) vRender x _ y = ([], y + toRenderPos (nodeHeight x + nodeDepth x)) hPackNode x = ([Node x], fixedGlue (nodeWidth x), nodeHeight x, nodeDepth x, []) vPackNode x = ([Node x], fixedGlue (nodeHeight x), nodeDepth x, nodeWidth x) nodePenalty _ = Nothing nodeWidth _ = 0 nodeHeight _ = 0 nodeDepth _ = 0 nodeGlueSet _ = GlueSet 0 Finite Stretching isNodeDiscardable _ = False traverseBox f = f . wrapNode showNode :: NodeClass x => x -> String hRender :: NodeClass x => x -> Node -> RenderPos -> (PageObjects, RenderPos) vRender :: NodeClass x => x -> Node -> RenderPos -> (PageObjects, RenderPos) hPackNode :: NodeClass x => x -> ([Node], Glue, Dimen, Dimen, [Node]) vPackNode :: NodeClass x => x -> ([Node], Glue, Dimen, Dimen) nodePenalty :: NodeClass x => x -> Maybe Int nodeWidth :: NodeClass x => x -> Dimen nodeHeight :: NodeClass x => x -> Dimen nodeDepth :: NodeClass x => x -> Dimen nodeGlueSet :: NodeClass x => x -> GlueSet isNodeDiscardable :: NodeClass x => x -> Bool traverseBox :: (NodeClass x, Applicative f, Monad f) => (Node -> f Node) -> x -> f Node data BoxDirection Horizontal :: BoxDirection Vertical :: BoxDirection data BoxNode BoxNode :: BoxDirection -> Dimen -> Dimen -> Dimen -> GlueSet -> [Node] -> BoxNode data RuleNode RuleNode :: (Maybe Dimen) -> (Maybe Dimen) -> (Maybe Dimen) -> RuleNode data KernNode KernNode :: Dimen -> KernNode data GlueNode GlueNode :: Glue -> GlueNode data SpecialNode SpecialNode :: ByteString -> SpecialNode data PenaltyNode PenaltyNode :: (Maybe Int) -> PenaltyNode data ShiftNode ShiftNode :: Dimen -> Node -> ShiftNode data TextNode TextNode :: Font -> TextString -> TextNode wrapNode :: NodeClass x => x -> Node castNode :: NodeClass x => Node -> Maybe x renderNode :: NodeClass x => x -> PageObjects travBoxPure :: NodeClass x => (x -> Node) -> Node -> Node travBoxFunc :: (Applicative f, Monad f, NodeClass x) => (x -> f Node) -> Node -> f Node typesetSimpleString :: Font -> String -> PageObject sumPackage :: [(Glue, Dimen, Dimen)] -> (Glue, Dimen, Dimen) hPack :: (Dimen -> Dimen) -> [Node] -> (BoxNode, Glue, [Node]) vPack :: Bool -> Dimen -> (Dimen -> Dimen) -> [Node] -> (BoxNode, Glue) findBreaks :: Bool -> (Node -> (Glue, Maybe Int)) -> [Node] -> [(Int, Glue, Int)] vSplit :: Dimen -> [Node] -> (BoxNode, [Node]) interlineGlue :: Dimen -> Glue -> Node -> [Node] -> [Node] typesetCustomString :: CustomStringFn x -> Font -> [x] -> [Node] typesetSingleWord :: Font -> String -> Node type CustomStringFn x = Font -> x -> (Int, Either Char (Int -> [Node])) withFrenchSpacing :: CustomStringFn Char data SimpleParagraphSetting SimpleParagraphSetting :: [Node] -> [Node] -> [Node] -> Dimen -> Glue -> SimpleParagraphSetting spsLeft :: SimpleParagraphSetting -> [Node] spsRight :: SimpleParagraphSetting -> [Node] spsInterline :: SimpleParagraphSetting -> [Node] spsWidth :: SimpleParagraphSetting -> Dimen spsBackground :: SimpleParagraphSetting -> Glue simpleParagraphSetting :: SimpleParagraphSetting simpleMakeParagraph :: SimpleParagraphSetting -> [Node] -> [Node] instance Typeable Node instance Typeable BoxNode instance Typeable RuleNode instance Typeable SpecialNode instance Typeable ShiftNode instance Typeable KernNode instance Typeable GlueNode instance Typeable PenaltyNode instance Typeable TextNode instance Eq LigKern instance Show LigKern instance Eq Extensible instance Show Extensible instance Eq FontChar instance Show FontChar instance Eq Font instance Show Font instance Eq PageObject instance Show PageObject instance Eq MoveReg instance Show MoveReg instance Eq PageCommand instance Show PageCommand instance Eq GlueSS instance Show GlueSS instance Eq Glue instance Show Glue instance Bounded GlueRank instance Eq GlueRank instance Enum GlueRank instance Ord GlueRank instance Show GlueRank instance Eq GlueSign instance Show GlueSign instance Eq GlueSet instance Show GlueSet instance Bounded BoxDirection instance Eq BoxDirection instance Enum BoxDirection instance Show BoxDirection instance Show RuleNode instance Show KernNode instance Show GlueNode instance Show PenaltyNode instance NodeClass TextNode instance NodeClass PenaltyNode instance NodeClass GlueNode instance NodeClass KernNode instance NodeClass ShiftNode instance NodeClass SpecialNode instance NodeClass RuleNode instance NodeClass BoxNode instance NodeClass Node instance Enum GlueSign instance FileData PageNumbers instance FileData (Ratio Word32) instance FileData ByteString instance FileData Int32 instance FileData Word32 instance FileData Word16 instance FileData Word8 instance Integral t => PageNumberClass (t, t, t, t, t, t) instance Integral t => PageNumberClass (t, t, t, t, t) instance Integral t => PageNumberClass (t, t, t, t) instance Integral t => PageNumberClass (t, t, t) instance Integral t => PageNumberClass (t, t) instance PageNumberClass Word32 instance PageNumberClass Int32 instance PageNumberClass Integer instance PageNumberClass Int module Graphics.DVI.Alignment data DataNode DataNode :: Int -> (Dimen -> Glue) -> DataNode data NoAlignNode NoAlignNode :: NoAlignNode data UnsetBoxNode UnsetBoxNode :: (Dimen -> Dimen) -> [Node] -> UnsetBoxNode hAlign :: Dimen -> [Node] -> [[[Node]]] -> [Node] vAlign :: Bool -> Dimen -> [Node] -> [[[Node]]] -> [Node] instance Typeable DataNode instance Typeable NoAlignNode instance Typeable UnsetBoxNode instance NodeClass UnsetBoxNode instance NodeClass NoAlignNode instance NodeClass DataNode