Package games.stendhal.common
Class Line
java.lang.Object
games.stendhal.common.Line
a line consisting of points
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classcallback which is invoked for each point -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrenderLine(int x1, int y1, int x2, int y2) renders a line from (x1, y2) to (x2, y2)static voidrenderLine(int x1, int y1, int x2, int y2, Line.Action action) renders a line from (x1, y2) to (x2, y2)
-
Constructor Details
-
Line
public Line()
-
-
Method Details
-
renderLine
renders a line from (x1, y2) to (x2, y2)- Parameters:
x1- x-coordinate of start pointy1- y-coordinate of start pointx2- x-coordinate of end pointy2- y-coordinate of end point- Returns:
- vector of points
-
renderLine
renders a line from (x1, y2) to (x2, y2)- Parameters:
x1- x-coordinate of start pointy1- y-coordinate of start pointx2- x-coordinate of end pointy2- y-coordinate of end pointaction- callback to call for each point
-