コード例 #1
0
        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);
        }
コード例 #2
0
        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)));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }