public class LineIterators extends Object
| Constructor and Description |
|---|
LineIterators() |
| Modifier and Type | Method and Description |
|---|---|
static Iterator<Pixel> |
bresenham(int x0,
int y0,
float fdx,
float fdy)
Pixel iterator based on Bresenham's algorithm for a line starting at a
given point, with an angle given by the provided x and y deltas.
|
static Iterator<Pixel> |
bresenham(int x0,
int y0,
int x1,
int y1)
Pixel iterator based on Bresenham's algorithm for a line between two
discrete endpoints.
|
static Iterator<Pixel> |
bresenham(Pixel start,
Pixel end)
Pixel iterator based on Bresenham's algorithm for a line between two
discrete endpoints.
|
static Iterator<Pixel> |
supercover(int x1,
int y1,
int x2,
int y2)
Generate the pixels for the supercover of the line between two points.
|
static List<Pixel> |
supercoverAsList(int x1,
int y1,
int x2,
int y2)
Generate the pixels for the supercover of the line between two points.
|
static List<Pixel> |
supercoverAsList(Pixel start,
Pixel end)
Generate the pixels for the supercover of the line between two points.
|
public LineIterators()
public static Iterator<Pixel> bresenham(Pixel start, Pixel end)
start - the coordinate of the start pointend - the coordinate of the end pointpublic static Iterator<Pixel> bresenham(int x0, int y0, int x1, int y1)
x0 - the x-ordinate of the start pointy0 - the y-ordinate of the start pointx1 - the x-ordinate of the end pointy1 - the y-ordinate of the end pointpublic static Iterator<Pixel> bresenham(int x0, int y0, float fdx, float fdy)
x0 - the x-ordinate of the start pointy0 - the y-ordinate of the start pointfdx - the x-gradientfdy - the y-gradientpublic static Iterator<Pixel> supercover(int x1, int y1, int x2, int y2)
x1 - the x-ordinate of the start pointy1 - the y-ordinate of the start pointx2 - the x-ordinate of the end pointy2 - the y-ordinate of the end pointpublic static List<Pixel> supercoverAsList(int x1, int y1, int x2, int y2)
x1 - the x-ordinate of the start pointy1 - the y-ordinate of the start pointx2 - the x-ordinate of the end pointy2 - the y-ordinate of the end pointpublic static List<Pixel> supercoverAsList(Pixel start, Pixel end)
start - the coordinate of the start pointend - the coordinate of the end point