2using System.Collections.Generic;
3using 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;
100 SKPaint Bak2 = State.
Text;
105 await base.MeasureSegments(Segments, State);
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 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
override async Task MeasureSegments(List< Segment > Segments, DrawingState State)
Measures text segments to a list of segments.
SKPaint Text
Current text paint settings
Variables Session
Current session.
Abstract base class for fonts.
SKFont FontDef
Measured Font
SKPaint Text
Measured Text
Layout2DDocument Document
Layout document.
Base interface for all layout elements.
Layout2DDocument Document
Layout document.