module Data.Text.ParagraphLayout.Internal.ParagraphAlignment
( ParagraphAlignment (..)
)
where
-- | Determines how the contents of the paragraph should be aligned
-- horizontally, that is, how should fragments be stacked inside each line
-- when there is space available.
--
-- This has no effect on lines with overflowing content.
data ParagraphAlignment
= AlignLeft
-- ^ Stack fragments to the left edge of each line,
-- leaving free space on the right side.
--
-- The leftmost fragment on each non-overflowing line will have its
-- `Data.Text.ParagraphLayout.Rect.x_min` equal to @0@.
| AlignRight
-- ^ Stack fragments to the right edge of each line,
-- leaving free space on the left side.
--
-- The rightmost fragment on each non-overflowing line will have its
-- `Data.Text.ParagraphLayout.Rect.x_max` equal to
-- `Data.Text.ParagraphLayout.Rich.paragraphMaxWidth`.
| AlignCentreH
-- ^ Stack fragments to the horizontal centre of each line,
-- leaving free space split evenly between each side.
deriving (Eq, Read, Show)