Example #1
0
 /// <summary>
 /// Sets the foreground color for a specific unit in the buffer.
 /// </summary>
 /// <param name="x">The X coordinate of the unit.</param>
 /// <param name="y">The Y coordinate of the unit.</param>
 /// <param name="color">The foreground color to set the unit to.</param>
 public void SetUnitForeColor(int x, int y, BufferColor color)
 {
     if (InBounds(ref x, ref y))
     {
         _buffer[y, x].ForeColor = color;
     }
 }
Example #2
0
        /// <summary>
        /// Draws a solid box with the specified dimensions to the buffer.
        /// </summary>
        /// <param name="x">The X coordinate of the box.</param>
        /// <param name="y">The Y coordinate of the box.</param>
        /// <param name="w">The width of the box.</param>
        /// <param name="h">The height of the box.</param>
        /// <param name="color">The color to draw the box with.</param>
        public void DrawBox(int x, int y, int w, int h, BufferColor color)
        {
            if (w < 0)
            {
                w *= -1;
                x -= w;
            }
            if (h < 0)
            {
                h *= -1;
                y -= h;
            }

            var b = _buffer;

            for (int i = 0; i < w; i++)
            {
                for (int j = 0; j < h; j++)
                {
                    if (InBounds(x + i, y + j))
                    {
                        b[y + j, x + i].BackColor = color;
                    }
                }
            }
        }
Example #3
0
        /// <summary>
        /// Prints a string to the buffer with the specified attributes and alignment.
        /// </summary>
        /// <param name="x">The X coordinate to start printing at.</param>
        /// <param name="y">The Y coordinate to start printing at.</param>
        /// <param name="text">The string to print.</param>
        /// <param name="color">The color to assign to the text.</param>
        /// <param name="alignment">The alignment of the string.</param>
        public void DrawString(int x, int y, string text, BufferColor color, Alignment alignment = Alignment.Left)
        {
            var b = _buffer;

            string[] lines = text.Split(new[] { '\n' });
            for (int i = 0; i < lines.Length; i++)
            {
                int len = lines[i].Length;
                for (int j = 0; j < len; j++)
                {
                    switch (alignment)
                    {
                    case Alignment.Left:
                        if (InBounds(x + j, y + i))
                        {
                            b[y + i, x + j].CharData  = lines[i][j];
                            b[y + i, x + j].ForeColor = color;
                        }
                        break;

                    case Alignment.Right:
                        if (InBounds(x - len + j, y + i))
                        {
                            b[y + i, x - len + j].CharData  = lines[i][j];
                            b[y + i, x - len + j].ForeColor = color;
                        }
                        break;
                    }
                }
            }
        }
Example #4
0
 /// <summary>
 /// Sets the foreground color for a specific unit in the buffer.
 /// </summary>
 /// <param name="point">The location of the unit.</param>
 /// <param name="color">The foreground color to set the unit to.</param>
 public void SetUnitForeColor(Point point, BufferColor color)
 {
     if (!InBounds(ref point))
     {
         return;
     }
     _buffer[point.Y, point.X].ForeColor = color;
 }
Example #5
0
 /// <summary>
 /// Sets the background color for a specific unit in the buffer.
 /// </summary>
 /// <param name="x">The X coordinate of the unit.</param>
 /// <param name="y">The Y coordinate of the unit.</param>
 /// <param name="color">The background color to set the unit to.</param>
 public void SetUnitBackColor(int x, int y, BufferColor color)
 {
     if (!InBounds(ref x, ref y))
     {
         return;
     }
     _buffer[y, x].BackColor = color;
 }
Example #6
0
 /// <summary>
 /// Create a new Plane object.
 /// </summary>
 public Plane(BufferColor color) : base()
 {
     Faces = new Face[1] {
         new Face(
             color,
             new Triangle3f(new Vector3(-1, 1, 1), new Vector3(-1, -1, 1), new Vector3(1, 1, 1)),
             new Triangle3f(new Vector3(-1, -1, 1), new Vector3(1, 1, 1), new Vector3(1, -1, 1))
             )
     };
 }
Example #7
0
        /// <inheritdoc />
        public void Dispose()
        {
            BufferColor.ForEach(o => o.Dispose());
            BufferColor = default;

            BufferDepth.Dispose();
            BufferDepth = default;

            Size = default;
        }
Example #8
0
 /// <summary>
 /// Create a new Plane object.
 /// </summary>
 public Plane(BufferColor color)
     : base()
 {
     Faces = new Face[1] {
         new Face(
             color,
             new Triangle3f(new Vector3(-1, 1, 1), new Vector3(-1, -1, 1), new Vector3(1, 1, 1)),
             new Triangle3f(new Vector3(-1, -1, 1), new Vector3(1, 1, 1), new Vector3(1, -1, 1))
         )
     };
 }
Example #9
0
 /// <summary>
 /// Clears all units in the buffer, optionally specifying a color to fill the buffer with.
 /// </summary>
 /// <param name="color">The color to fill the buffer with.</param>
 public unsafe void Clear(BufferColor color = BufferColor.Black)
 {
     fixed(BufferUnitInfo *b = _buffer)
     {
         for (int i = UnitCount; i >= 0; i--)
         {
             b[i].BackColor = color;
             b[i].ForeColor = color;
             b[i].CharData  = '\0';
         }
     }
 }
Example #10
0
        /// <summary>
        /// Draws a solid circle to the buffer with the specified attributes.
        /// </summary>
        /// <param name="x">The X position of the circle, relative to its center.</param>
        /// <param name="y">The Y position of the circle, relative to its center.</param>
        /// <param name="radius">The radius of the circle.</param>
        /// <param name="color">The color to draw the circle with.</param>
        public void DrawCircle(int x, int y, int radius, BufferColor color)
        {
            if (radius < 0)
            {
                radius *= -1;
            }
            int rr = radius * radius;

            for (int i = -radius; i <= radius; i++)
            {
                for (int j = -radius; j <= radius; j++)
                {
                    if (i * i + j * j <= rr && InBounds(x + i, y + j))
                    {
                        _buffer[y + j, x + i].BackColor = color;
                    }
                }
            }
        }
Example #11
0
        /// <summary>
        /// Draws a circle with the specified radius, border thickness, and attributes for both border and fill.
        /// </summary>
        /// <param name="x">The X position of the circle, relative to its center.</param>
        /// <param name="y">The Y position of the circle, relative to its center.</param>
        /// <param name="radius">The radius of the circle.</param>
        /// <param name="thickness">The border thickness of the circle.</param>
        /// <param name="border">The border color for the circle.</param>
        /// <param name="fill">The fill color for the circle.</param>
        public void DrawCircle(int x, int y, int radius, int thickness, BufferColor border, BufferColor fill)
        {
            if (radius < 0)
            {
                radius *= -1;
            }
            if (thickness < 0)
            {
                thickness *= -1;
            }
            if (thickness > radius)
            {
                thickness = radius;
            }
            int rra = radius * radius;
            int rrb = (radius - thickness) * (radius - thickness);
            int d   = 0;

            for (int i = -radius; i <= radius; i++)
            {
                for (int j = -radius; j <= radius; j++)
                {
                    d = i * i + j * j;
                    if (InBounds(x + i, y + j))
                    {
                        if (d < rrb)
                        {
                            _buffer[y + j, x + i].BackColor = fill;
                        }
                        else if (d <= rra)
                        {
                            _buffer[y + j, x + i].BackColor = border;
                        }
                    }
                }
            }
        }
Example #12
0
        /// <summary>
        /// Draws a solid box with the specified dimensions to the buffer.
        /// </summary>
        /// <param name="x">The X coordinate of the box.</param>
        /// <param name="y">The Y coordinate of the box.</param>
        /// <param name="w">The width of the box.</param>
        /// <param name="h">The height of the box.</param>
        /// <param name="color">The color to draw the box with.</param>
        public void DrawBox(int x, int y, int w, int h, BufferColor color)
        {
            if (w < 0)
            {
                w *= -1;
                x -= w;
            }
            if (h < 0)
            {
                h *= -1;
                y -= h;
            }

            var b = _buffer;

            for (int i = 0; i < w; i++)
                for (int j = 0; j < h; j++)
                {
                    if (InBounds(x + i, y + j))
                    {
                        b[y + j, x + i].BackColor = color;
                    }
                }
        }
Example #13
0
 /// <summary>
 /// Clears all units in the buffer, optionally specifying a color to fill the buffer with.
 /// </summary>
 /// <param name="color">The color to fill the buffer with.</param>
 public unsafe void Clear(BufferColor color = BufferColor.Black)
 {
     fixed (BufferUnitInfo* b = _buffer)
     {
         for (int i = UnitCount; i >= 0; i--)
         {
             b[i].BackColor = color;
             b[i].ForeColor = color;
             b[i].CharData = '\0';
         }
     }
 }
Example #14
0
 /// <summary>
 /// Sets the foreground color for a specific unit in the buffer.
 /// </summary>
 /// <param name="x">The X coordinate of the unit.</param>
 /// <param name="y">The Y coordinate of the unit.</param>
 /// <param name="color">The foreground color to set the unit to.</param>
 public void SetUnitForeColor(int x, int y, BufferColor color)
 {
     if (InBounds(ref x, ref y))
     {
         _buffer[y, x].ForeColor = color;
     }
 }
Example #15
0
 /// <summary>
 /// Draws a triangle to the buffer.
 /// </summary>
 /// <param name="a">The first point of the triangle.</param>
 /// <param name="b">The second point of the triangle.</param>
 /// <param name="c">The third point of the triangle.</param>
 /// <param name="color">The color of the line.</param>
 public void DrawTriangle(ref Point a, ref Point b, ref Point c, BufferColor color)
 {
     DrawLine(ref a, ref b, color);
     DrawLine(ref b, ref c, color);
     DrawLine(ref c, ref a, color);
 }
Example #16
0
 /// <summary>
 /// Prints a string to the buffer with the specified attributes and alignment.
 /// </summary>
 /// <param name="x">The X coordinate to start printing at.</param>
 /// <param name="y">The Y coordinate to start printing at.</param>
 /// <param name="text">The string to print.</param>
 /// <param name="color">The color to assign to the text.</param>
 /// <param name="alignment">The alignment of the string.</param>
 public void DrawString(int x, int y, string text, BufferColor color, Alignment alignment = Alignment.Left)
 {
     var b = _buffer;
     string[] lines = text.Split(new[] { '\n' });
     for (int i = 0; i < lines.Length; i++)
     {
         int len = lines[i].Length;
         for (int j = 0; j < len; j++)
         {
             switch (alignment)
             {
                 case Alignment.Left:
                     if (InBounds(x + j, y + i))
                     {
                         b[y + i, x + j].CharData = lines[i][j];
                         b[y + i, x + j].ForeColor = color;
                     }
                     break;
                 case Alignment.Right:
                     if (InBounds(x - len + j, y + i))
                     {
                         b[y + i, x - len + j].CharData = lines[i][j];
                         b[y + i, x - len + j].ForeColor = color;
                     }
                     break;
             }
         }
     }
 }
Example #17
0
 /// <summary>
 /// Draws a line to the buffer.
 /// </summary>
 /// <param name="x">The starting X coordinate of the line.</param>
 /// <param name="y">The starting Y coordinate of the line.</param>
 /// <param name="x2">The ending X coordinate of the line.</param>
 /// <param name="y2">The ending Y coordinate of the line.</param>
 /// <param name="color">The color of the line.</param>
 public void DrawLine(int x, int y, int x2, int y2, BufferColor color)
 {
     var b = _buffer;
     int w = x2 - x;
     int h = y2 - y;
     int dx1 = 0, dy1 = 0, dx2 = 0, dy2 = 0;
     if (w < 0) dx1 = -1; else if (w > 0) dx1 = 1;
     if (h < 0) dy1 = -1; else if (h > 0) dy1 = 1;
     if (w < 0) dx2 = -1; else if (w > 0) dx2 = 1;
     int longest = Math.Abs(w);
     int shortest = Math.Abs(h);
     if (!(longest > shortest))
     {
         longest = Math.Abs(h);
         shortest = Math.Abs(w);
         if (h < 0) dy2 = -1; else if (h > 0) dy2 = 1;
         dx2 = 0;
     }
     int numerator = longest >> 1;
     for (int i = 0; i <= longest; i++)
     {
         if (InBounds(ref x, ref y))
         {
             b[y, x].BackColor = color;
         }
         numerator += shortest;
         if (!(numerator < longest))
         {
             numerator -= longest;
             x += dx1;
             y += dy1;
         }
         else
         {
             x += dx2;
             y += dy2;
         }
     }
 }
Example #18
0
 /// <summary>
 /// Clears the active buffer to the specified attributes.
 /// </summary>
 /// <param name="clearColor">The attributes to fill the buffer with.</param>
 public static void Clear(BufferColor clearColor = BufferColor.Black)
 {
     ActiveBuffer.Clear(clearColor);
 }
Example #19
0
 /// <summary>
 /// Draws a colored line to the buffer.
 /// </summary>
 /// <param name="a">The starting point of the line.</param>
 /// <param name="b">The ending point of the line.</param>
 /// <param name="color">The color of the line.</param>
 public void DrawLine(ref Point a, ref Point b, BufferColor color)
 {
     DrawLine(a.X, a.Y, b.X, b.Y, color);
 }
Example #20
0
 /// <summary>
 /// Draws a triangle to the buffer.
 /// </summary>
 /// <param name="triangle">The triangle to draw.</param>
 /// <param name="color">The color to draw the triangle.</param>
 public void DrawTriangle(ref Triangle triangle, BufferColor color)
 {
     DrawLine(ref triangle.A, ref triangle.B, color);
     DrawLine(ref triangle.B, ref triangle.C, color);
     DrawLine(ref triangle.C, ref triangle.A, color);
 }
Example #21
0
 /// <summary>
 /// Draws a triangle to the buffer.
 /// </summary>
 /// <param name="a">The first point of the triangle.</param>
 /// <param name="b">The second point of the triangle.</param>
 /// <param name="c">The third point of the triangle.</param>
 /// <param name="color">The color of the line.</param>
 public void DrawTriangle(ref Point a, ref Point b, ref Point c, BufferColor color)
 {
     DrawLine(ref a, ref b, color);
     DrawLine(ref b, ref c, color);
     DrawLine(ref c, ref a, color);
 }
Example #22
0
 /// <summary>
 /// Draws a solid circle to the buffer with the specified attributes.
 /// </summary>
 /// <param name="x">The X position of the circle, relative to its center.</param>
 /// <param name="y">The Y position of the circle, relative to its center.</param>
 /// <param name="radius">The radius of the circle.</param>
 /// <param name="color">The color to draw the circle with.</param>
 public void DrawCircle(int x, int y, int radius, BufferColor color)
 {
     if (radius < 0) radius *= -1;
     int rr = radius * radius;
     for(int i = -radius; i <= radius; i++)
     for (int j = -radius; j <= radius; j++)
     {
         if (i * i + j * j <= rr && InBounds(x + i, y + j))
         {
             _buffer[y + j, x + i].BackColor = color;
         }
     }
 }
Example #23
0
        /// <summary>
        /// Draws a line to the buffer.
        /// </summary>
        /// <param name="x">The starting X coordinate of the line.</param>
        /// <param name="y">The starting Y coordinate of the line.</param>
        /// <param name="x2">The ending X coordinate of the line.</param>
        /// <param name="y2">The ending Y coordinate of the line.</param>
        /// <param name="color">The color of the line.</param>
        public void DrawLine(int x, int y, int x2, int y2, BufferColor color)
        {
            var b = _buffer;
            int w = x2 - x;
            int h = y2 - y;
            int dx1 = 0, dy1 = 0, dx2 = 0, dy2 = 0;

            if (w < 0)
            {
                dx1 = -1;
            }
            else if (w > 0)
            {
                dx1 = 1;
            }
            if (h < 0)
            {
                dy1 = -1;
            }
            else if (h > 0)
            {
                dy1 = 1;
            }
            if (w < 0)
            {
                dx2 = -1;
            }
            else if (w > 0)
            {
                dx2 = 1;
            }
            int longest  = Math.Abs(w);
            int shortest = Math.Abs(h);

            if (!(longest > shortest))
            {
                longest  = Math.Abs(h);
                shortest = Math.Abs(w);
                if (h < 0)
                {
                    dy2 = -1;
                }
                else if (h > 0)
                {
                    dy2 = 1;
                }
                dx2 = 0;
            }
            int numerator = longest >> 1;

            for (int i = 0; i <= longest; i++)
            {
                if (InBounds(ref x, ref y))
                {
                    b[y, x].BackColor = color;
                }
                numerator += shortest;
                if (!(numerator < longest))
                {
                    numerator -= longest;
                    x         += dx1;
                    y         += dy1;
                }
                else
                {
                    x += dx2;
                    y += dy2;
                }
            }
        }
Example #24
0
 /// <summary>
 /// Draws a circle with the specified radius, border thickness, and attributes for both border and fill.
 /// </summary>
 /// <param name="x">The X position of the circle, relative to its center.</param>
 /// <param name="y">The Y position of the circle, relative to its center.</param>
 /// <param name="radius">The radius of the circle.</param>
 /// <param name="thickness">The border thickness of the circle.</param>
 /// <param name="border">The border color for the circle.</param>
 /// <param name="fill">The fill color for the circle.</param>
 public void DrawCircle(int x, int y, int radius, int thickness, BufferColor border, BufferColor fill)
 {
     if (radius < 0) radius *= -1;
     if (thickness < 0) thickness *= -1;
     if (thickness > radius) thickness = radius;
     int rra = radius * radius;
     int rrb = (radius - thickness) * (radius - thickness);
     int d = 0;
     for(int i = -radius; i <= radius; i++)
     for (int j = -radius; j <= radius; j++)
     {
         d = i * i + j * j;
         if (InBounds(x + i, y + j))
         {
             if(d < rrb)
             {
                 _buffer[y + j, x + i].BackColor = fill;
             }
             else if (d <= rra)
             {
                 _buffer[y + j, x + i].BackColor = border;
             }
         }
     }
 }
Example #25
0
 /// <summary>
 /// Creates a new SolidBufferBrush of a specified color.
 /// </summary>
 /// <param name="color">The color of the brush.</param>
 public SolidBufferBrush(BufferColor color)
 {
     _color = color;
 }
Example #26
0
 /// <summary>
 /// Draws a colored line to the buffer.
 /// </summary>
 /// <param name="a">The starting point of the line.</param>
 /// <param name="b">The ending point of the line.</param>
 /// <param name="color">The color of the line.</param>
 public void DrawLine(ref Point a, ref Point b, BufferColor color)
 {
     DrawLine(a.X, a.Y, b.X, b.Y, color);
 }
 /// <summary>
 /// Creates a new CheckeredBufferBrush with the specified colors.
 /// </summary>
 /// <param name="colorA">The first color in the pattern.</param>
 /// <param name="colorB">The second color in the pattern.</param>
 public CheckeredBufferBrush(BufferColor colorA, BufferColor colorB)
 {
     _ca = colorA;
     _cb = colorB;
 }
Example #28
0
 /// <summary>
 /// Draws a triangle to the buffer.
 /// </summary>
 /// <param name="triangle">The triangle to draw.</param>
 /// <param name="color">The color to draw the triangle.</param>
 public void DrawTriangle(ref Triangle triangle, BufferColor color)
 {
     DrawLine(ref triangle.A, ref triangle.B, color);
     DrawLine(ref triangle.B, ref triangle.C, color);
     DrawLine(ref triangle.C, ref triangle.A, color);
 }
Example #29
0
 /// <summary>
 /// Sets the foreground color for a specific unit in the buffer.
 /// </summary>
 /// <param name="point">The location of the unit.</param>
 /// <param name="color">The foreground color to set the unit to.</param>
 public void SetUnitForeColor(Point point, BufferColor color)
 {
     if (!InBounds(ref point)) return;
     _buffer[point.Y, point.X].ForeColor = color;
 }
Example #30
0
 /// <summary>
 /// Flood fills a closed region containing the specified coordinates with a color.
 /// </summary>
 /// <param name="x">The X coordinate to begin filling at.</param>
 /// <param name="y">The Y coordinate to begin filling at.</param>
 /// <param name="color">The color to fill the region with.</param>
 public void FloodFill(int x, int y, BufferColor color)
 {
     if (!InBounds(x, y)) return;
     var initColor = _buffer[y, x].BackColor;
     if (color == initColor) return;
     List<Point> queue = new List<Point>(32);
     queue.Add(new Point(x, y));
     Point p;
     int w, e, j;
     for (int i = 0; i < queue.Count; i++)
     {
         p = queue[i];
         w = e = p.X;
         while(w - 1 >= 0)
         {
             if (_buffer[p.Y, w - 1].BackColor == initColor)
             {
                 w--;
             }
             else
             {
                 break;
             }
         }
         while (e + 1 < _width)
         {
             if (_buffer[p.Y, e + 1].BackColor == initColor)
             {
                 e++;
             }
             else
             {
                 break;
             }
         }
         for (j = w; j <= e; j++)
         {
             _buffer[p.Y, j].BackColor = color;
             if (p.Y + 1 < _height)
             {
                 if (_buffer[p.Y + 1, j].BackColor == initColor)
                 {
                     queue.Add(new Point(j, p.Y + 1));
                 }
             }
             if (p.Y - 1 >= 0)
             {
                 if (_buffer[p.Y - 1, j].BackColor == initColor)
                 {
                     queue.Add(new Point(j, p.Y - 1));
                 }
             }
         }
     }
 }
Example #31
0
        /// <summary>
        /// Flood fills a closed region containing the specified coordinates with a color.
        /// </summary>
        /// <param name="x">The X coordinate to begin filling at.</param>
        /// <param name="y">The Y coordinate to begin filling at.</param>
        /// <param name="color">The color to fill the region with.</param>
        public void FloodFill(int x, int y, BufferColor color)
        {
            if (!InBounds(x, y))
            {
                return;
            }
            var initColor = _buffer[y, x].BackColor;

            if (color == initColor)
            {
                return;
            }
            List <Point> queue = new List <Point>(32);

            queue.Add(new Point(x, y));
            Point p;
            int   w, e, j;

            for (int i = 0; i < queue.Count; i++)
            {
                p = queue[i];
                w = e = p.X;
                while (w - 1 >= 0)
                {
                    if (_buffer[p.Y, w - 1].BackColor == initColor)
                    {
                        w--;
                    }
                    else
                    {
                        break;
                    }
                }
                while (e + 1 < _width)
                {
                    if (_buffer[p.Y, e + 1].BackColor == initColor)
                    {
                        e++;
                    }
                    else
                    {
                        break;
                    }
                }
                for (j = w; j <= e; j++)
                {
                    _buffer[p.Y, j].BackColor = color;
                    if (p.Y + 1 < _height)
                    {
                        if (_buffer[p.Y + 1, j].BackColor == initColor)
                        {
                            queue.Add(new Point(j, p.Y + 1));
                        }
                    }
                    if (p.Y - 1 >= 0)
                    {
                        if (_buffer[p.Y - 1, j].BackColor == initColor)
                        {
                            queue.Add(new Point(j, p.Y - 1));
                        }
                    }
                }
            }
        }
Example #32
0
 /// <summary>
 /// Create a new Face from one or more triangles.
 /// </summary>
 /// <param name="tris">One or more triangles.</param>
 public Face(BufferColor color, params Triangle3f[] tris)
 {
     this.Triangles = tris;
     this.Color     = color;
 }
Example #33
0
 /// <summary>
 /// Create a new Face from one or more triangles.
 /// </summary>
 /// <param name="tris">One or more triangles.</param>
 public Face(BufferColor color, params Triangle3f[] tris)
 {
     this.Triangles = tris;
     this.Color = color;
 }
Example #34
0
 /// <summary>
 /// Creates a new CheckeredBufferBrush with the specified colors.
 /// </summary>
 /// <param name="colorA">The first color in the pattern.</param>
 /// <param name="colorB">The second color in the pattern.</param>
 public CheckeredBufferBrush(BufferColor colorA, BufferColor colorB)
 {
     _ca = colorA;
     _cb = colorB;
 }
Example #35
0
 /// <summary>
 /// Sets the background color for a specific unit in the buffer.
 /// </summary>
 /// <param name="x">The X coordinate of the unit.</param>
 /// <param name="y">The Y coordinate of the unit.</param>
 /// <param name="color">The background color to set the unit to.</param>
 public void SetUnitBackColor(int x, int y, BufferColor color)
 {
     if (!InBounds(ref x, ref y)) return;
     _buffer[y, x].BackColor = color;
 }
Example #36
0
 /// <summary>
 /// Clears the active buffer to the specified attributes.
 /// </summary>
 /// <param name="clearColor">The attributes to fill the buffer with.</param>
 public static void Clear(BufferColor clearColor = BufferColor.Black)
 {
     ActiveBuffer.Clear(clearColor);
 }
Example #37
0
 /// <summary>
 /// Creates a new SolidBufferBrush of a specified color.
 /// </summary>
 /// <param name="color">The color of the brush.</param>
 public SolidBufferBrush(BufferColor color)
 {
     _color = color;
 }