/// <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); } }
/// <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)); } }
/// <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)); } }