예제 #1
0
 /// <summary>
 /// Draws the line.
 /// </summary>
 /// <param name="buffer">The graphic buffer.</param>
 public override void Draw(GraphicBuffer buffer)
 {
     foreach (Coordinate point in RasterLine(this.StartPoint.X, this.StartPoint.Y, this.EndPoint.X, this.EndPoint.Y))
     {
         buffer.DrawPixel(this.Token, point);
     }
 }
예제 #2
0
        /// <summary>
        /// Draws the ellipse.
        /// </summary>
        /// <param name="buffer">The <see cref="GraphicBuffer"/> to draw on.</param>
        public override void Draw(GraphicBuffer buffer)
        {
            var points = this.RasterEllipse
                (
                    this.Centre.X,
                    this.Centre.Y,
                    this.A + (int)(this.A / (1.75)), // Compensate the proportions of the symbols in the console
                    this.B
                );

            foreach (Point point in points)
            {
                buffer.DrawPixel(this.Token, new Coordinate((int)point.X, (int)point.Y));
            }
        }
예제 #3
0
        /// <summary>
        /// Draws the ellipse.
        /// </summary>
        /// <param name="buffer">The <see cref="GraphicBuffer"/> to draw on.</param>
        public override void Draw(GraphicBuffer buffer)
        {
            var points = RasterEllipse
                         (
                this.Centre.X,
                this.Centre.Y,
                this.A + (int)(this.A / (1.75)), // Compensate the proportions of the symbols in the console
                this.B
                         );

            foreach (Point point in points)
            {
                buffer.DrawPixel(this.Token, new Coordinate((int)point.X, (int)point.Y));
            }
        }