| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
Graphics.Rendering.MiniTypeset.Box
Description
Boxes are rectangular shapes having a margin and an extra gap between boxes placed next to each other.
A Box has an inner box, and an outer box which is like a margin. 
 The inner boxes are used for relative placement, while the outer boxes
 determine the extent. Furthermore, extra gaps between boxes placed next 
 to each other are supported.
Boxes has their origin at the top-left corner of their inner box.
 Absolute boxes (AbsBox) have an extra offset.
We use screen-space coordinate system (Y increase downwards).
Synopsis
- data Box = Box {
- _rboxXSize :: !Double
 - _rboxYSize :: !Double
 - _rboxLeftMarg :: !Double
 - _rboxRightMarg :: !Double
 - _rboxTopMarg :: !Double
 - _rboxBotMarg :: !Double
 - _rboxXGap :: !Double
 - _rboxYGap :: !Double
 
 - emptyBox :: Box
 - data AbsBox = AbsBox {
- _aboxOffset :: !Pos
 - _aboxRelBox :: !Box
 
 - hcatBox :: VAlign -> Box -> Box -> (Box, Pos, Pos)
 - vcatBox :: HAlign -> Box -> Box -> (Box, Pos, Pos)
 - hcatBox2 :: VAlign -> Box -> Box -> (Box, (AbsBox, AbsBox))
 - vcatBox2 :: HAlign -> Box -> Box -> (Box, (AbsBox, AbsBox))
 - hcatBoxes :: VAlign -> [Box] -> (Box, [AbsBox])
 - vcatBoxes :: HAlign -> [Box] -> (Box, [AbsBox])
 
Documentation
A (relative) box
Constructors
| Box | |
Fields 
  | |
An absolute box
Constructors
| AbsBox | |
Fields 
  | |
hcatBox :: VAlign -> Box -> Box -> (Box, Pos, Pos) Source #
Concatantes two boxes horizontally, using the inner boxes to align them. The two positions we return are relative positions of the two boxes from the origin (top-left inner corner) of the concatenated box.