Package squidpony.squidmath
Class Elias
java.lang.Object
squidpony.squidmath.Elias
- All Implemented Interfaces:
Serializable
public class Elias extends Object implements Serializable
Contains methods to draw anti-aliased lines based on floating-point
coordinates.
Because of the way this line is calculated, endpoints may be swapped and therefore the list may not be in start-to-end order.
Based on work by Hugo Elias at http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm which is in turn based on work by Wu.
Because of the way this line is calculated, endpoints may be swapped and therefore the list may not be in start-to-end order.
Based on work by Hugo Elias at http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm which is in turn based on work by Wu.
- Author:
- Eben Howard - http://squidpony.com - howard@squidpony.com
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description Elias()
-
Method Summary
Modifier and Type Method Description ArrayList<Coord>
getLastPath()
double[][]
lightMap(double startx, double starty, double endx, double endy)
ArrayList<Coord>
line(double startx, double starty, double endx, double endy)
Gets the line between the two points.ArrayList<Coord>
line(double startx, double starty, double endx, double endy, double brightnessThreshold)
Gets the line between the two points.ArrayList<Coord>
line(Coord start, Coord end)
ArrayList<Coord>
line(Coord start, Coord end, double brightnessThreshold)
-
Constructor Details
-
Method Details
-
lightMap
-
line
Gets the line between the two points.- Parameters:
startx
-starty
-endx
-endy
-- Returns:
-
line
public ArrayList<Coord> line(double startx, double starty, double endx, double endy, double brightnessThreshold)Gets the line between the two points.- Parameters:
startx
-starty
-endx
-endy
-brightnessThreshold
- between 0.0 (default) and 1.0; only Points with higher brightness will be included- Returns:
-
line
-
line
-
getLastPath
-