Safe Haskell | None |
---|---|
Language | Haskell2010 |
Sizes inline text & extracts positioned children, wraps Balkón for the actual logic.
Synopsis
- inlineMinWidth :: Font' -> Paragraph -> Double
- inlineMin :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y
- inlineNatWidth :: Font' -> Paragraph -> Double
- inlineHeight :: Font' -> Double -> Paragraph -> Double
- inlineSize :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y
- inlineChildren :: [x] -> Paragraph -> [(x, Fragment)]
- layoutSize :: (CastDouble x, CastDouble y) => Font' -> ParagraphLayout -> Size x y
- layoutChildren :: [x] -> ParagraphLayout -> [(x, Fragment)]
- fragmentSize :: (CastDouble x, CastDouble y) => Font' -> Fragment -> Size x y
- fragmentSize' :: CastDouble x => Font' -> Fragment -> Size x x
- fragmentPos :: Font' -> (Double, Double) -> Fragment -> (Double, Double)
Documentation
inlineMinWidth :: Font' -> Paragraph -> Double Source #
Compute minimum width for some richtext.
inlineMin :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y Source #
Compute minimum width & height for some richtext.
inlineNatWidth :: Font' -> Paragraph -> Double Source #
Compute natural (single-line) width for some richtext.
inlineHeight :: Font' -> Double -> Paragraph -> Double Source #
Compute height for rich text at given width.
inlineSize :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y Source #
Compute width & height of some richtext at configured width.
inlineChildren :: [x] -> Paragraph -> [(x, Fragment)] Source #
Retrieve children out of some richtext, associating given userdata with them.
layoutSize :: (CastDouble x, CastDouble y) => Font' -> ParagraphLayout -> Size x y Source #
Retrieve a laid-out paragraph's rect & convert to CatTrap types.
layoutChildren :: [x] -> ParagraphLayout -> [(x, Fragment)] Source #
Retrieve a laid-out paragraph's children & associate with given userdata.
fragmentSize :: (CastDouble x, CastDouble y) => Font' -> Fragment -> Size x y Source #
Retrieve the rect for a fragment & convert to CatTrap types.
fragmentSize' :: CastDouble x => Font' -> Fragment -> Size x x Source #
Variant of fragmentSize
asserting to the typesystem that both fields
of the resulting Size
are of the same type.
fragmentPos :: Font' -> (Double, Double) -> Fragment -> (Double, Double) Source #
Retrieve the position of a fragment.