public void Line_DDA(int x0, int y0, int x1, int y1, int color) { if (this.LineWidth != 1) { this.LineWidth_AA_Bresenham(x0, y0, x1, y1, ColorTool.IntToColor(color)); return; } int dx = x1 - x0, dy = y1 - y0; int step = Math.Abs(dx) > Math.Abs(dy) ? Math.Abs(dx) : Math.Abs(dy); //if (Math.Abs(dx) > Math.Abs(dy)) step = Math.Abs(dx); else step = Math.Abs(dy); float x = x0, y = y0, incX = dx / (float)step, incY = dy / (float)step; for (int i = 0; i <= step; i++) { this.TrySetPixel((int)Math.Round(x), (int)Math.Round(y), color); x += incX; y += incY; } }
public void Triangle_Isosceles(int x0, int y0, int x1, int y1, Color color) => this.Triangle_Isosceles(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void Line_Bresenham(int x0, int y0, int x1, int y1, Color color) => this.Line_Bresenham(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void QuadraticBezier(int x0, int y0, int x1, int y1, int x2, int y2, Color color) => this.QuadraticBezier(x0, y0, x1, y1, x2, y2, ColorTool.ColorToInt(color));
public void Fill_FF8_Dynamic(int x, int y, Color fill) => this.Fill_FF8_Dynamic(x, y, ColorTool.ColorToInt(fill));
public void Fill_FF4_Recursive(int x, int y, byte fill_alpha, byte fill_red, byte fill_green, byte fill_blue) => this.Fill_FF4_Recursive(x, y, ColorTool.ArgbToInt(fill_alpha, fill_red, fill_green, fill_blue));
public void Fill_BF8_Recursive(int x, int y, Color border, Color fill) => this.Fill_BF8_Recursive(x, y, ColorTool.ColorToInt(border), ColorTool.ColorToInt(fill));
public void Ellipse_BresenhamRect(int x0, int y0, int x1, int y1, byte alpha, byte red, byte green, byte blue) => this.Ellipse_BresenhamRect(x0, y0, x1, y1, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Circle_Midpoint(int xc, int yc, int radius, Color color) => this.Circle_Midpoint(xc, yc, radius, ColorTool.ColorToInt(color));
public void Etc_Arrow(int x0, int y0, int x1, int y1, byte alpha, byte red, byte green, byte blue) => this.Etc_Arrow(x0, y0, x1, y1, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Etc_Arrow(int x0, int y0, int x1, int y1, Color color) => this.Etc_Arrow(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void Etc_Arrow(IntPoint source, IntPoint destination, Color color) => this.Etc_Arrow(source.X, source.Y, destination.X, destination.Y, ColorTool.ColorToInt(color));
public void Triangle_Right(int x0, int y0, int x1, int y1, byte alpha, byte red, byte green, byte blue) => this.Triangle_Right(x0, y0, x1, y1, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Triangle_Right(int x0, int y0, int x1, int y1, Color color) => this.Triangle_Right(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void Triangle_Right(IntPoint source, IntPoint destination, Color color) => this.Triangle_Right(source.X, source.Y, destination.X, destination.Y, ColorTool.ColorToInt(color));
public void Ellipse_BresenhamRect(int x0, int y0, int x1, int y1, Color color) => this.Ellipse_BresenhamRect(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void Line_DDA(int x0, int y0, int x1, int y1, Color color) => this.Line_DDA(x0, y0, x1, y1, ColorTool.ColorToInt(color));
public void Circle_Bresenham(IntPoint center, int radius, Color color) => this.Circle_Bresenham(center.X, center.Y, radius, ColorTool.ColorToInt(color));
public void Circle_Bresenham(int xc, int yc, int radius, Color color) => this.Circle_Bresenham(xc, yc, radius, ColorTool.ColorToInt(color));
public void Circle_Bresenham(int xc, int yc, int radius, byte alpha, byte red, byte green, byte blue) => this.Circle_Bresenham(xc, yc, radius, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Fill_BF8_Recursive(int x, int y, byte border_alpha, byte border_red, byte border_green, byte border_blue, byte fill_alpha, byte fill_red, byte fill_green, byte fill_blue) => this.Fill_BF8_Recursive(x, y, ColorTool.ArgbToInt(border_alpha, border_red, border_green, border_blue), ColorTool.ArgbToInt(fill_alpha, fill_red, fill_green, fill_blue));
public void Ellipse_Midpoint(IntPoint center, int radiusX, int radiusY, Color color) => this.Ellipse_Midpoint(center.X, center.Y, radiusX, radiusY, ColorTool.ColorToInt(color));
public void Fill_FF8_Recursive(int x, int y, Color fill) => this.Fill_FF8_Recursive(x, y, ColorTool.ColorToInt(fill));
public void Ellipse_Midpoint(int xc, int yc, int radiusX, int radiusY, Color color) => this.Ellipse_Midpoint(xc, yc, radiusX, radiusY, ColorTool.ColorToInt(color));
public void Fill_FF8_Dynamic(int x, int y, byte fill_alpha, byte fill_red, byte fill_green, byte fill_blue) => this.Fill_FF8_Dynamic(x, y, ColorTool.ArgbToInt(fill_alpha, fill_red, fill_green, fill_blue));
public void Ellipse_Midpoint(int xc, int yc, int radiusX, int radiusY, byte alpha, byte red, byte green, byte blue) => this.Ellipse_Midpoint(xc, yc, radiusX, radiusY, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Line_Bresenham(IntPoint source, IntPoint destination, Color color) => this.Line_Bresenham(source.X, source.Y, destination.X, destination.Y, ColorTool.ColorToInt(color));
public void Ellipse_BresenhamRect(IntPoint source, IntPoint target, Color color) => this.Ellipse_BresenhamRect(source.X, source.Y, target.X, target.Y, ColorTool.ColorToInt(color));
public void Line_Bresenham(int x0, int y0, int x1, int y1, byte alpha, byte red, byte green, byte blue) => this.Line_Bresenham(x0, y0, x1, y1, ColorTool.ArgbToInt(alpha, red, green, blue));
public void Triangle_Equilateral(int xc, int yc, int radius, byte alpha, byte red, byte green, byte blue) => this.Triangle_Equilateral(xc, yc, radius, ColorTool.ArgbToInt(alpha, red, green, blue));