public abstract void DrawEllipse(Graphics g, Ellipse ellipse);
public override void DrawEllipse(Graphics g, Ellipse ellipse) { PenDraw.Color = ellipse.PenColor; PenDraw.Width = ellipse.StrokeWidth; int x = ellipse.Center.X; int y = ellipse.Center.Y; int rX = ellipse.RadiusX; int rY = ellipse.RadiusY; int currentX = 0; int currentY = rY; int currentcheckvalue = rY * rY - rX * rX * rY + 1 / 4 * rX * rX; while (2 * rY * rY * currentX < 2 * rX * rX * currentY) { SetPixel2Ellipse(g, currentX, currentY, x, y); if (currentcheckvalue < 0) currentcheckvalue += rY * rY * (2 * currentX + 3); else { currentcheckvalue += rY * rY * (2 * currentX + 3) - 2 * rX * rX * (currentY - 1); currentY--; } currentX++; } currentcheckvalue = rY * rY * (currentX + 1 / 2) * (currentX + 1 / 2) + rX * rX * (currentY - 1) * (currentY - 1) - rX * rX * rY * rY; while (currentY != 0) { SetPixel2Ellipse(g, currentX, currentY, x, y); if (currentcheckvalue > 0) currentcheckvalue += - rX * rX * (2 * currentY - 3); else { currentcheckvalue += 2 * rY * rY * (currentX + 1) - rX * rX * (2 * currentY - 3); currentX++; } currentY--; } }
public override void DrawEllipse(Graphics g, Ellipse ellipse) { }