public final class DrawingTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ARROW_ANGLE
A default angle for arrow barbs.
|
static double |
DEFAULT_ARROW_DISTANCE
A default distance along the line for arrow barbs.
|
static double |
DEFAULT_ARROW_LENGTH
A default length (in pixels) for arrow barbs.
|
Modifier and Type | Method and Description |
---|---|
static void |
drawArrowHeads(int startX,
int startY,
int endX,
int endY,
double angle,
double length,
double d,
java.awt.Graphics g)
Draw an arrowhead on a line.
|
static void |
drawArrowHeads(int startX,
int startY,
int endX,
int endY,
java.awt.Graphics g)
Draw an arrowhead on a line with some default options.
|
static Pair<Pair<java.lang.Integer,java.lang.Integer>,Pair<java.lang.Integer,java.lang.Integer>> |
getArrowHeads(int startX,
int startY,
int endX,
int endY,
double angle,
double length,
double d)
Get the coordinates for arrow heads along a line.
|
public static final double DEFAULT_ARROW_ANGLE
public static final double DEFAULT_ARROW_LENGTH
public static final double DEFAULT_ARROW_DISTANCE
public static Pair<Pair<java.lang.Integer,java.lang.Integer>,Pair<java.lang.Integer,java.lang.Integer>> getArrowHeads(int startX, int startY, int endX, int endY, double angle, double length, double d)
startX
- The start of the line (X).startY
- The start of the line (Y).endX
- The end of the line (X).endY
- The end of the line (Y).angle
- The angle of the arrow barbs.length
- The length of the arrow barbs.d
- The distance along the line to place the barbs. This must be between zero and one.public static void drawArrowHeads(int startX, int startY, int endX, int endY, double angle, double length, double d, java.awt.Graphics g)
startX
- The start of the line (X).startY
- The start of the line (Y).endX
- The end of the line (X).endY
- The end of the line (Y).angle
- The angle of the arrow barbs.length
- The length of the arrow barbs.d
- The distance along the line to draw the barbs. This must be between zero and one.g
- The graphics object to draw on.public static void drawArrowHeads(int startX, int startY, int endX, int endY, java.awt.Graphics g)
startX
- The start of the line (X).startY
- The start of the line (Y).endX
- The end of the line (X).endY
- The end of the line (Y).g
- The graphics object to draw on.