This topic covers the implementation details of TTextStrokeRec.
Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.
State controls the payload; Options selects color, shade, opacity, width, join, mitre limit and no-fill. Numeric selected values use Trunc(value×10000). Preserve the trailing comma in Options.
The reader seeds several numeric buffers with 10000. These are reader fallback values, distinct from any initializer defaults; the supplied helper leaves these defaults unchanged when an element is absent; still follow the enclosing activation and initialization rules.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TTextStrokeRec. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
State
XML representation: The text of the State element.
Initial value: qcbGrayed (2) (TTextStrokeRec.Initialize).
Reading: Reads the element into State when the record node exists; the State child element exists.
Writing: Stores the numeric value of State (see the value table below) whenever the writer reaches this field.
Options
XML representation: The text of the Options element.
Reading: Reads the stored value for Options; its subsequent processing is shown in Implementation when the record node exists; the State child element exists; State is qcbChecked (1).
Writing: Stores strOptions when State is qcbChecked (1).
ColorName
XML representation: The text of the ColorName element.
Initial value: an empty string (TTextStrokeRec.Initialize).
Reading: Reads the element into ColorName when the record node exists; the State child element exists; State is qcbChecked (1).
Writing: Stores ColorName when State is qcbChecked (1); tstColor is selected in Options.
Width
XML representation: The text of the Width element.
Initial value: 1 (TTextStrokeRec.Initialize).
Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Width when the record node exists; the State child element exists; State is qcbChecked (1). The temporary numeric value starts at 10000 before reading.
Writing: Stores Width multiplied by 10000.0, then truncated to an integer when State is qcbChecked (1); tstWidth is selected in Options.
Shade
XML representation: The text of the Shade element.
Initial value: 100 (TTextStrokeRec.Initialize).
Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Shade when the record node exists; the State child element exists; State is qcbChecked (1). The temporary numeric value starts at 10000 before reading.
Writing: Stores Shade multiplied by 10000.0, then truncated to an integer when State is qcbChecked (1); tstShade is selected in Options.
Opacity
XML representation: The text of the Opacity element.
Initial value: 100 (TTextStrokeRec.Initialize).
Reading: Reads the stored number, divides it by 10000.0, and assigns the result to Opacity when the record node exists; the State child element exists; State is qcbChecked (1). The temporary numeric value starts at 10000 before reading.
Writing: Stores Opacity multiplied by 10000.0, then truncated to an integer when State is qcbChecked (1); tstOpacity is selected in Options.
MitreLimit
XML representation: The text of the MitreLimit element.
Initial value: 4 (TTextStrokeRec.Initialize).
Reading: Reads the stored number, divides it by 10000.0, and assigns the result to MitreLimit when the record node exists; the State child element exists; State is qcbChecked (1). The temporary numeric value starts at 10000 before reading.
Writing: Stores MitreLimit multiplied by 10000.0, then truncated to an integer when State is qcbChecked (1); tstMitreLimit is selected in Options.
NoFill
XML representation: The text of the NoFill element.
Initial value: false (TTextStrokeRec.Initialize).
Reading: Reads the element into NoFill when the record node exists; the State child element exists; State is qcbChecked (1).
Writing: Stores true or false according to NoFill when State is qcbChecked (1); tstNoFill is selected in Options.
Join
XML representation: The text of the Join element.
Initial value: 0 (TTextStrokeRec.Initialize).
Reading: Reads the element into Join when the record node exists; the State child element exists; State is qcbChecked (1).
Writing: Stores the numeric value of Join when State is qcbChecked (1); tstJoin is selected in Options.
@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TTextStrokeRec” whenever the writer reaches this field.
Initialization and reset values
TTextStrokeRec.Initialize
Setting or temporary variable |
Initial value |
When it is assigned |
self |
Default (TTextStrokeRec) |
Always |
State |
qcbGrayed (2) |
Always |
ColorName |
an empty string |
Always |
Shade |
100 |
Always |
Opacity |
100 |
Always |
Width |
1 |
Always |
NoFill |
false |
Always |
Join |
0 |
Always |
MitreLimit |
4 |
Always |
Value namespaces used by this implementation
These are declared Pascal ordinal values. Use the ordinal only where the field serializer actually writes ord(...), an integer cast or an equivalent value. Set-marker strings and local option lists have their own representation; sentinel members in an enum are not automatically legal XML choices.
TqppCheckBoxState
Ordinal |
Declared member |
0 |
qcbUnchecked |
1 |
qcbChecked |
2 |
qcbGrayed |
TTextStrokeOptions
Ordinal |
Declared member |
0 |
tstColor |
1 |
tstShade |
2 |
tstOpacity |
3 |
tstWidth |
4 |
tstJoin |
5 |
tstMitreLimit |
6 |
tstNoFill |
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
State |
TqppCheckBoxState |
member |
Options |
set of TTextStrokeOptions |
member |
FColorName |
array [1..50] of Char |
member |
Shade |
double |
member |
Opacity |
double |
member |
Width |
double |
member |
Join |
integer |
member |
MitreLimit |
double |
member |
NoFill |
boolean |
member |
ColorName |
string |
property/accessor |
The Implementation toggle contains only TTextStrokeRec methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Declaration reproduces this record’s complete declaration from the supplied source, including its fields, properties and method signatures.