1using System.Threading.Tasks;
21 : base(Document, Parent)
28 public override string LocalName =>
"SolidBackground";
36 set => this.color = value;
43 public override Task
FromXml(XmlElement Input)
46 return base.FromXml(Input);
55 base.ExportAttributes(Output);
57 this.color?.
Export(Output);
77 base.CopyContents(Destination);
90 await base.DoMeasureDimensions(State);
92 if (this.
paint is
null)
97 this.paint =
new SKPaint()
99 FilterQuality = SKFilterQuality.High,
101 Style = SKPaintStyle.Fill,
116 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.
ColorAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Result of asynchronous evaluation.
bool Ok
If evaluation was successful.
Abstract base class for backgrounds.
SKPaint paint
Current background
override void ExportAttributes(XmlWriter Output)
Exports attributes to XML.
override Task FromXml(XmlElement Input)
Populates the element (including children) with information from its XML definition.
SolidBackground(Layout2DDocument Document, ILayoutElement Parent)
A solid background
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
override string LocalName
Local name of type of element.
override async Task DoMeasureDimensions(DrawingState State)
Measures layout entities and defines unassigned properties, related to dimensions.
override void CopyContents(ILayoutElement Destination)
Copies contents (attributes and children) to the destination element.
override void ExportStateAttributes(XmlWriter Output)
Exports the local attributes of the current element.
Variables Session
Current session.
Layout2DDocument Document
Layout document.
Base interface for all layout elements.
Layout2DDocument Document
Layout document.