TeXCache

References
public sealed class TeXCache
A cached collection of TeX boxes properly laid out.

Constructors

TeXCache

#
Cache the boxes as implied by a TeX break sequence.
public TeXCache(
breaks,
Break sequence to cache.
PointF
anchor,
Top left corner of the first line.
layout,
Layout settings.
justify = 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.
public TeXCache(
breaks,
Break sequence to cache.
PointF
anchor,
Top left corner of the first line.
layout,
Layout settings.
alignment
How lines are placed within the line width. Note that the line breaking itself always optimises for the justified case.
)

Properties

Anchor

#
Gets the anchor for the layout.
public PointF Anchor { get; }

Bounds

#
Gets the bounds of the entire text block.
public RectangleF Bounds { get; }

Count

#
Gets the total number of boxes cached.
public int Count { get; }

Lines

#
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.
public RectangleF[] Lines { get; }

Indexers

this[]

#
Gets the box and insertion point for a specific cached box.
public (TeXBox Box, PointF Point) this[
index
] { get; }

Methods

CreateFromPlainText

#
Create a layout cache directly from plain text.
public static TeXCache CreateFromPlainText(
text,
Text to layout.
RectangleF
frame,
Frame for layout. If the LAYOUT override is specified, the width of the frame is ignored.
Font
font,
Font to use.
Color
colour,
Colour to use.
spacing = null,
Optional spacing overrides.
layout = null,
Optional layout overrides.
demerits = null,
Optional demerits override.
justify = true
If true, lines are stretched to fill the line width.
)
Cached layout.

CreateFromTeXText

#
Create a layout cache directly from TeX formatted text. Only a few TeX commands are supported.
public static TeXCache CreateFromTeXText(
text,
Text to layout.
RectangleF
frame,
Frame for layout. If the LAYOUT override is specified, the width of the frame is ignored.
fonts,
Fonts to use.
spacing = null,
Optional spacing overrides.
layout = null,
Optional layout overrides.
demerits = null,
Optional demerits override.
justify = true
If true, lines are stretched to fill the line width.
)
Cached layout.

Move

#
Move all boxes by a fixed amount.
public TeXCache Move(
dx,
dy
)

RenderEmptyBoxes

#
Render all empty boxes.
public void RenderEmptyBoxes(
context,
Graphics context.
Action<Context, TeXBox, RectangleF>
method
Drawing method.
)

RenderTextBoxes

#
Render all text boxes.
public void RenderTextBoxes(
context,
Graphics context.
SizeF
offset
MOtion offset.
)

RenderTextBoxes

#
Render all text boxes.
public void RenderTextBoxes(
context
Graphics context.
)