public Label( IReadOnlyRegion region, Alignments alignments, FormattedString content, CharColors?backgroundFill = null) { this.content = new ContentValue(content); this.alignments = alignments; this.backgroundFill = backgroundFill; this.Ctor(region); }
public Label( FormattedString content, Alignments alignments, CharColors?backgroundFill = null) { this.content = new ContentValue(content); this.alignments = alignments; this.backgroundFill = backgroundFill; this.Ctor( new Region( new Coord(0, 0), new Coord(this.content.Width, this.content.Height))); }
internal Fill( FormattedString pattern, CharColors?backgroundFill = null) { ContentValue contentValue = new ContentValue(pattern); this.Region = new Region(Coord.Zero, contentValue.ToCoord()); this.Region.OnChanged += (obj, e) => { if (e.ChangeTypes.HasFlag(RegionChangeTypes.Resize)) { this.Recalculate(e.AfterChange, contentValue, backgroundFill); } }; this.Recalculate(this.Region, contentValue, backgroundFill); }
public Fill( IReadOnlyRegion region, FormattedString pattern, CharColors?backgroundFill = null) { ContentValue contentValue = new ContentValue(pattern); this.Region = new Region(region); this.Region.OnChanged += (obj, e) => { if (e.ChangeTypes.HasFlag(RegionChangeTypes.Resize)) { this.Recalculate(e.AfterChange, contentValue, backgroundFill); } }; this.Recalculate(this.Region, contentValue, backgroundFill); }