2using System.Threading.Tasks;
23 : base(Document, Parent)
38 set => this.font = value;
45 public override Task
FromXml(XmlElement Input)
49 return base.FromXml(Input);
58 base.ExportAttributes(Output);
71 return new FontRef(Document, Parent);
80 base.CopyContents(Destination);
82 if (Destination is
FontRef Dest)
99 SKFont Bak = State.
Font;
105 await base.MeasureSegments(Segments, State);
108 State.TextPen = Bak2;
111 await base.MeasureSegments(Segments, State);
120 base.ExportStateAttributes(Output);
Contains a 2D layout document.
void Export(XmlWriter Output)
Exports the attribute.
void ExportState(XmlWriter Output)
Exports the state of the attribute.
static async Task< EvaluationResult< T > > TryEvaluate(Attribute< T > Attribute, Variables Session)
Tries to evaluate the attribute value.
Result of asynchronous evaluation.
T Result
Evaluated result, if successful.
bool Ok
If evaluation was successful.
StringAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Abstract base class of embedded text elements in flowing text.
Represents text using a specific font in flowing text.
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
override void ExportStateAttributes(XmlWriter Output)
Exports the local attributes of the current element.
FontRef(Layout2DDocument Document, ILayoutElement Parent)
Represents text using a specific font in flowing text.
override void ExportAttributes(XmlWriter Output)
Exports attributes to XML.
override string LocalName
Local name of type of element.
override async Task MeasureSegments(ChunkedList< Segment > Segments, DrawingState State)
Measures text segments to a list of segments.
override Task FromXml(XmlElement Input)
Populates the element (including children) with information from its XML definition.
override void CopyContents(ILayoutElement Destination)
Copies contents (attributes and children) to the destination element.
StringAttribute FontAttribute
Font
Variables Session
Current session.
SKPaint TextPen
Current text paint settings
Abstract base class for fonts.
SKFont FontDef
Measured Font
Layout2DDocument Document
Layout document.
A chunked list is a linked list of chunks of objects of type T .
Base interface for all layout elements.
Layout2DDocument Document
Layout document.