module Data.Text.ParagraphLayout.Internal.ProtoFragment (ProtoFragment(..))
where
import Data.Int (Int32)
import Data.Text.Glyphize (Direction, GlyphInfo, GlyphPos)
-- | A box fragment positioned within an indeterminate line.
data ProtoFragment = ProtoFragment
{ direction :: Maybe Direction
-- ^ Text direction, which is constant within a fragment.
, offset :: Int32
-- ^ Distance from the start of the line,
-- depending on the text direction.
, advance :: Int32
-- ^ Total advance of glyphs in this fragment,
-- depending on the text direction.
, glyphs :: [(GlyphInfo, GlyphPos)]
}