StdPaint.ConsoleBuffer.DrawCircle C# (CSharp) Method

DrawCircle() public method

Draws a solid circle to the buffer with the specified attributes.
public DrawCircle ( int x, int y, int radius, BufferBrush brush ) : void
x int The X position of the circle, relative to its center.
y int The Y position of the circle, relative to its center.
radius int The radius of the circle.
brush BufferBrush The brush to draw the circle with.
return void
        public void DrawCircle(int x, int y, int radius, BufferBrush brush)
        {
            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 = brush.GetColor(x + i,y + j);
                    }
                }
        }

Same methods

ConsoleBuffer::DrawCircle ( int x, int y, int radius, BufferColor color ) : void
ConsoleBuffer::DrawCircle ( int x, int y, int radius, int thickness, BufferBrush border, BufferBrush fill ) : void
ConsoleBuffer::DrawCircle ( int x, int y, int radius, int thickness, BufferColor border, BufferColor fill ) : void