Packages

case class QArrow(p1: R2 = R2 (0.0, 0.0), pc: R2 = R2 (0.0, 0.0), p2: R2 = R2 (0.0, 0.0), len: Int = 10) extends Double with CurvilinearShape with Product with Serializable

The QArrow class uses Java's Path2D class to create a quad curve with an arrowhead on the far end. The main curve is defined by points 'p1' and 'p2' along with a control point 'pc'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.

p1

the starting point for the curve/arc

pc

the control point for the curve/arc

p2

the ending point for the curve/arc

len

the length of the arrowhead on the curve/arc

Linear Supertypes
Serializable, Product, Equals, CurvilinearShape, Error, Double, Serializable, Path2D, Cloneable, Shape, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QArrow
  2. Serializable
  3. Product
  4. Equals
  5. CurvilinearShape
  6. Error
  7. Double
  8. Serializable
  9. Path2D
  10. Cloneable
  11. Shape
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QArrow(p1: R2, p2: R2, bend: Double)

    Construct a QArrow (quad arc) where bend indicates the distance to the control point.

    Construct a QArrow (quad arc) where bend indicates the distance to the control point.

    p1

    the starting point for the curve/arc

    p2

    the ending point for the curve/arc

    bend

    the bend or curvature (1. => line length)

  2. new QArrow(p1: R2 = R2 (0.0, 0.0), pc: R2 = R2 (0.0, 0.0), p2: R2 = R2 (0.0, 0.0), len: Int = 10)

    p1

    the starting point for the curve/arc

    pc

    the control point for the curve/arc

    p2

    the ending point for the curve/arc

    len

    the length of the arrowhead on the curve/arc

Value Members

  1. final def append(arg0: PathIterator, arg1: Boolean): Unit
    Definition Classes
    Double → Path2D
  2. final def append(arg0: Shape, arg1: Boolean): Unit
    Definition Classes
    Path2D
  3. final def clone(): AnyRef
    Definition Classes
    Double → Path2D → AnyRef
  4. final def closePath(): Unit
    Definition Classes
    Path2D
  5. final def contains(arg0: Rectangle2D): Boolean
    Definition Classes
    Path2D → Shape
  6. final def contains(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Boolean
    Definition Classes
    Path2D → Shape
  7. final def contains(arg0: Point2D): Boolean
    Definition Classes
    Path2D → Shape
  8. final def contains(arg0: Double, arg1: Double): Boolean
    Definition Classes
    Path2D → Shape
  9. final def createTransformedShape(arg0: AffineTransform): Shape
    Definition Classes
    Path2D
  10. final def curveTo(arg0: Double, arg1: Double, arg2: Double, arg3: Double, arg4: Double, arg5: Double): Unit
    Definition Classes
    Double → Path2D
  11. final def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  12. final def getBounds(): java.awt.Rectangle
    Definition Classes
    Path2D → Shape
  13. final def getBounds2D(): Rectangle2D
    Definition Classes
    Double → Shape
  14. def getCenterX(): Double

    Get the x-coordinate of the center of the main line/curve.

    Get the x-coordinate of the center of the main line/curve.

    Definition Classes
    QArrowCurvilinearShape
  15. def getCenterY(): Double

    Get the y-coordinate of the center of the main line/curve.

    Get the y-coordinate of the center of the main line/curve.

    Definition Classes
    QArrowCurvilinearShape
  16. final def getCurrentPoint(): Point2D
    Definition Classes
    Path2D
  17. final def getPathIterator(arg0: AffineTransform): PathIterator
    Definition Classes
    Double → Shape
  18. final def getPathIterator(arg0: AffineTransform, arg1: Double): PathIterator
    Definition Classes
    Path2D → Shape
  19. final def getWindingRule(): Int
    Definition Classes
    Path2D
  20. final def intersects(arg0: Rectangle2D): Boolean
    Definition Classes
    Path2D → Shape
  21. final def intersects(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Boolean
    Definition Classes
    Path2D → Shape
  22. val len: Int
  23. final def lineTo(arg0: Double, arg1: Double): Unit
    Definition Classes
    Double → Path2D
  24. final def moveTo(arg0: Double, arg1: Double): Unit
    Definition Classes
    Double → Path2D
  25. def next(width: Double, height: Double): R2

    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 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.

    width

    the width of object traversing the curve

    height

    the height of object traversing the curve

    Definition Classes
    CurvilinearShape
  26. var p1: R2
  27. var p2: R2
  28. var pc: R2
  29. final def quadTo(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Unit
    Definition Classes
    Double → Path2D
  30. final def reset(): Unit
    Definition Classes
    Path2D
  31. def setLine(_p1: R2, _pc: R2, _p2: R2): Unit

    Set (or reset) the location for the QArrow as a curve using an explicitly given control point.

    Set (or reset) the location for the QArrow as a curve using an explicitly given control point.

    _p1

    the starting point

    _pc

    the control point

    _p2

    the ending point

    Definition Classes
    QArrowCurvilinearShape
  32. def setLine(_p1: R2, _p2: R2, bend: Double): Unit

    Set (or reset) the location for the QArrow as a curve using bend to compute the control point.

    Set (or reset) the location for the QArrow as a curve using bend to compute the control point.

    _p1

    the starting point

    _p2

    the ending point

    bend

    the bend or curvature (1. => line-length)

    Definition Classes
    QArrowCurvilinearShape
  33. def setLine(_p1: R2, _p2: R2): Unit

    Set (or reset) the location for the QArrow as a line.

    Set (or reset) the location for the QArrow as a line.

    _p1

    the starting point

    _p2

    the ending point

    Definition Classes
    QArrowCurvilinearShape
  34. final def setWindingRule(arg0: Int): Unit
    Definition Classes
    Path2D
  35. final def transform(arg0: AffineTransform): Unit
    Definition Classes
    Double → Path2D