Arrow
The Arrow
class uses Java's Path2D class to create a line with an arrowhead on the far end. The main line is defined by points 'p1' and 'p2'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.
Value parameters
- len
-
the length of the arrowhead on the line/arrow
- p1
-
the starting point for the line/arrow
- p2
-
the ending point for the line/arrow
Attributes
- Graph
-
- Supertypes
-
trait Producttrait Equalstrait CurvilinearShapeclass Doubletrait Serializableclass Path2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Get the x-coordinate of the center of the main line.
Get the x-coordinate of the center of the main line.
Attributes
Get the y-coordinate of the center of the main line.
Get the y-coordinate of the center of the main line.
Attributes
Set (or reset) the location for the Arrow as a line.
Set (or reset) the location for the Arrow as a line.
Value parameters
- _p1
-
the starting point
- _p2
-
the ending point
Attributes
Set (or reset) the location for the Arrow as a line. The bend parameter is ignored for this class, since arrows are straight.
Set (or reset) the location for the Arrow as a line. The bend parameter is ignored for this class, since arrows are straight.
Value parameters
- _p1
-
the starting point
- _p2
-
the ending point
- bend
-
the bend or curvature (0. => straight line)
Attributes
Inherited methods
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
Attributes
- Returns
-
a copy of the receiver object.
- Note
-
not specified by SLS as a member of AnyRef
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Double
Return the next point on the CurvilinearShape
(one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height. Return null if past end point. This is an optional method.
Return the next point on the CurvilinearShape
(one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height. Return null if past end point. This is an optional method.
Value parameters
- height
-
the height of object traversing the curve
- width
-
the width of object traversing the curve
Attributes
- Inherited from:
- CurvilinearShape
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- CurvilinearShape
Set (or reset) the location for a line/curve using an explicitly given control point. This is an optional method.
Set (or reset) the location for a line/curve using an explicitly given control point. This is an optional method.
Value parameters
- p1
-
the starting point
- p2
-
the ending point
- pc
-
the control point
Attributes
- Inherited from:
- CurvilinearShape
Attributes
- Inherited from:
- CurvilinearShape
Attributes
- Inherited from:
- CurvilinearShape
Attributes
- Inherited from:
- Path2D
Attributes
- Inherited from:
- Double
Attributes
- Inherited from:
- Double