Constructors
TeXCache
#Cache the boxes as implied by a TeX break sequence.
Parameters:
| breaks (TeXBreak) | Break sequence to cache. |
| anchor (PointF) | Top left corner of the first line. |
| layout (TeXLayout) | Layout settings. |
| justify (bool = true) | If true, glue is stretched so that lines fill the entire line width. If false, glue keeps its ideal width and the right hand edge comes out ragged. Note that the line breaking itself always optimises for the justified case. |
TeXCache
#Cache the boxes as implied by a TeX break sequence.
Parameters:
| breaks (TeXBreak) | Break sequence to cache. |
| anchor (PointF) | Top left corner of the first line. |
| layout (TeXLayout) | Layout settings. |
| alignment (TeXAlignment) | How lines are placed within the line width. Note that the line breaking itself always optimises for the justified case. |
Properties
Lines
#public RectangleF[] Lines { get; }
Gets the extent of every line, in order from top to bottom. A line without any visible content has zero width but still occupies its height.
Indexers
Methods
CreateFromPlainText
#public static TeXCache CreateFromPlainText(string text, RectangleF frame, Font font, Color colour, TeXSpacing spacing = null, TeXLayout layout = null, TeXDemerits demerits = null, bool justify = true)
Create a layout cache directly from plain text.
Parameters:
| text (string) | Text to layout. |
| frame (RectangleF) | Frame for layout. If the LAYOUT override is specified, the width of the frame is ignored. |
| font (Font) | Font to use. |
| colour (Color) | Colour to use. |
| spacing (TeXSpacing = null) | Optional spacing overrides. |
| layout (TeXLayout = null) | Optional layout overrides. |
| demerits (TeXDemerits = null) | Optional demerits override. |
| justify (bool = true) | If true, lines are stretched to fill the line width. |
Returns: Cached layout.
CreateFromTeXText
#public static TeXCache CreateFromTeXText(string text, RectangleF frame, TeXFonts fonts, TeXSpacing spacing = null, TeXLayout layout = null, TeXDemerits demerits = null, bool justify = true)
Create a layout cache directly from TeX formatted text. Only a few TeX commands are supported.
Parameters:
| text (string) | Text to layout. |
| frame (RectangleF) | Frame for layout. If the LAYOUT override is specified, the width of the frame is ignored. |
| fonts (TeXFonts) | Fonts to use. |
| spacing (TeXSpacing = null) | Optional spacing overrides. |
| layout (TeXLayout = null) | Optional layout overrides. |
| demerits (TeXDemerits = null) | Optional demerits override. |
| justify (bool = true) | If true, lines are stretched to fill the line width. |
Returns: Cached layout.
Move
#Move all boxes by a fixed amount.
RenderEmptyBoxes
#Render all empty boxes.