public class GraphicsUtils extends java.lang.Object
Constructor and Description |
---|
GraphicsUtils() |
Modifier and Type | Method and Description |
---|---|
static java.awt.geom.GeneralPath |
getArrowHead(java.awt.Point p1,
java.awt.Point p2,
int arrowBarbSize,
double arrowPhi)
Returns a path for the arrow at the end of an edge from p1 to p2.
|
static java.awt.Point |
getChopboxAnchor(java.awt.Rectangle box,
java.awt.Point referencePoint)
The ChopboxAnchor's location is found by calculating the intersection of
a line drawn from the center point of a box to a reference point and that
box.
|
public GraphicsUtils()
public static java.awt.geom.GeneralPath getArrowHead(java.awt.Point p1, java.awt.Point p2, int arrowBarbSize, double arrowPhi)
arrowBarbSize
- gives the size of the barb in pixels (i.e. the size of the
arrow tip)arrowPhi
- gives the angle between the barbs and the center line, i.e.
this is half of the angle of the arrow tip.public static java.awt.Point getChopboxAnchor(java.awt.Rectangle box, java.awt.Point referencePoint)