module Data.Text.ParagraphLayout.Internal.ParagraphExtents
( paragraphOriginX
, paragraphOriginY
, containRects
, emptyRect
)
where
import Data.Text.ParagraphLayout.Internal.Rect
paragraphOriginX :: (Num a) => a
paragraphOriginX = 0
paragraphOriginY :: (Num a) => a
paragraphOriginY = 0
emptyRect :: (Num a) => Rect a
emptyRect = Rect
{ x_origin = paragraphOriginX
, y_origin = paragraphOriginY
, x_size = 0
, y_size = 0
}
containRects :: (Ord a, Num a) => [Rect a] -> Rect a
containRects = foldr (union LH) emptyRect