| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Text.ParagraphLayout
Description
Positions and distances are represented as 32-bit integers. Their unit must
be defined by the caller, who must calculate the desired dimensions of the
EM square of the input font and set them using
optionScale.
For example, if 1em = 20px, if the output pixels are square, and if the
output coordinates are in 1/64ths of a pixel, you should set the scale to
.Just (1280, 1280)
X coordinates increase from left to right.
Y coordinates increase from bottom to top.
Documentation
Constructors
| Fragment | |
Fields
| |
Instances
| Eq Fragment | |
| Read Fragment | |
Defined in Data.Text.ParagraphLayout.Internal.Fragment | |
| Show Fragment | |
data LineHeight #
Instances
| Eq LineHeight | |
| Read LineHeight | |
Defined in Data.Text.ParagraphLayout.Internal.LineHeight Methods readsPrec :: Int -> ReadS LineHeight readList :: ReadS [LineHeight] readPrec :: ReadPrec LineHeight readListPrec :: ReadPrec [LineHeight] | |
| Show LineHeight | |
Defined in Data.Text.ParagraphLayout.Internal.LineHeight Methods showsPrec :: Int -> LineHeight -> ShowS show :: LineHeight -> String showList :: [LineHeight] -> ShowS | |
data PageContinuity #
Instances
data PageOptions #
Constructors
| PageOptions | |
Fields
| |
Minimal complete definition
Instances
| Paginable ParagraphLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Paginable Methods paginate :: PageOptions -> ParagraphLayout -> (PageContinuity, ParagraphLayout, Maybe ParagraphLayout) # | |
| Line a => Paginable [a] | |
Defined in Data.Text.ParagraphLayout.Internal.Paginable Methods paginate :: PageOptions -> [a] -> (PageContinuity, [a], Maybe [a]) # | |
data ParagraphLayout #
Constructors
| ParagraphLayout | |
Fields
| |
Instances
| Eq ParagraphLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Plain.ParagraphLayout Methods (==) :: ParagraphLayout -> ParagraphLayout -> Bool (/=) :: ParagraphLayout -> ParagraphLayout -> Bool | |
| Read ParagraphLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Plain.ParagraphLayout Methods readsPrec :: Int -> ReadS ParagraphLayout readList :: ReadS [ParagraphLayout] readPrec :: ReadPrec ParagraphLayout readListPrec :: ReadPrec [ParagraphLayout] | |
| Show ParagraphLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Plain.ParagraphLayout Methods showsPrec :: Int -> ParagraphLayout -> ShowS show :: ParagraphLayout -> String showList :: [ParagraphLayout] -> ShowS | |
| Paginable ParagraphLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Paginable Methods paginate :: PageOptions -> ParagraphLayout -> (PageContinuity, ParagraphLayout, Maybe ParagraphLayout) # | |
data ParagraphOptions #
Constructors
| ParagraphOptions | |
Fields
| |
Instances
| Eq ParagraphOptions | |
Defined in Data.Text.ParagraphLayout.Internal.ParagraphOptions Methods (==) :: ParagraphOptions -> ParagraphOptions -> Bool (/=) :: ParagraphOptions -> ParagraphOptions -> Bool | |
| Show ParagraphOptions | |
Defined in Data.Text.ParagraphLayout.Internal.ParagraphOptions Methods showsPrec :: Int -> ParagraphOptions -> ShowS show :: ParagraphOptions -> String showList :: [ParagraphOptions] -> ShowS | |
Constructors
| Span | |
Fields
| |
Instances
| Eq Span | |
| Read Span | |
Defined in Data.Text.ParagraphLayout.Internal.Span | |
| Show Span | |
data SpanLayout #
Constructors
| SpanLayout [Fragment] |
Instances
| Eq SpanLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Span | |
| Read SpanLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods readsPrec :: Int -> ReadS SpanLayout readList :: ReadS [SpanLayout] readPrec :: ReadPrec SpanLayout readListPrec :: ReadPrec [SpanLayout] | |
| Show SpanLayout | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods showsPrec :: Int -> SpanLayout -> ShowS show :: SpanLayout -> String showList :: [SpanLayout] -> ShowS | |
data SpanOptions #
Constructors
| SpanOptions | |
Fields
| |
Instances
| Eq SpanOptions | |
Defined in Data.Text.ParagraphLayout.Internal.Span | |
| Read SpanOptions | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods readsPrec :: Int -> ReadS SpanOptions readList :: ReadS [SpanOptions] readPrec :: ReadPrec SpanOptions readListPrec :: ReadPrec [SpanOptions] | |
| Show SpanOptions | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods showsPrec :: Int -> SpanOptions -> ShowS show :: SpanOptions -> String showList :: [SpanOptions] -> ShowS | |
layoutPlain :: Paragraph -> ParagraphLayout #
paginate :: Paginable pl => PageOptions -> pl -> (PageContinuity, pl, Maybe pl) #
paragraphSpanBounds :: Paragraph -> NonEmpty Int #
paragraphSpanTexts :: Paragraph -> [Text] #
paragraphText :: Paragraph -> Text #