QArrow

scalation.scala2d.QArrow
case class QArrow(var p1: R2, var pc: R2, var p2: R2, len: Int) extends Double, CurvilinearShape

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.

Value parameters

len

the length of the arrowhead on the curve/arc

p1

the starting point for the curve/arc

p2

the ending point for the curve/arc

pc

the control point for the curve/arc

Attributes

Graph
Supertypes
trait Product
trait Equals
class Double
trait Serializable
class Path2D
trait Cloneable
trait Shape
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(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.

Value parameters

bend

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

p1

the starting point for the curve/arc

p2

the ending point for the curve/arc

Attributes

Concrete methods

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.

Attributes

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.

Attributes

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.

Value parameters

_p1

the starting point

_p2

the ending point

Attributes

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.

Value parameters

_p1

the starting point

_p2

the ending point

bend

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

Attributes

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

Value parameters

_p1

the starting point

_p2

the ending point

_pc

the control point

Attributes

Definition Classes

Inherited methods

final def append(x$0: PathIterator, x$1: Boolean): Unit

Attributes

Inherited from:
Double
final def append(x$0: Shape, x$1: Boolean): Unit

Attributes

Inherited from:
Path2D
final def clone(): <FromJavaObject>

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
final def closePath(): Unit

Attributes

Inherited from:
Path2D
final def contains(x$0: Rectangle2D): Boolean

Attributes

Inherited from:
Path2D
final def contains(x$0: Double, x$1: Double, x$2: Double, x$3: Double): Boolean

Attributes

Inherited from:
Path2D
final def contains(x$0: Point2D): Boolean

Attributes

Inherited from:
Path2D
final def contains(x$0: Double, x$1: Double): Boolean

Attributes

Inherited from:
Path2D
final def createTransformedShape(x$0: AffineTransform): Shape

Attributes

Inherited from:
Path2D
final def curveTo(x$0: Double, x$1: Double, x$2: Double, x$3: Double, x$4: Double, x$5: Double): Unit

Attributes

Inherited from:
Double
final def getBounds(): Rectangle

Attributes

Inherited from:
Path2D
final def getBounds2D(): Rectangle2D

Attributes

Inherited from:
Double
final def getCurrentPoint(): Point2D

Attributes

Inherited from:
Path2D
final def getPathIterator(x$0: AffineTransform, x$1: Double): PathIterator

Attributes

Inherited from:
Path2D
final def getPathIterator(x$0: AffineTransform): PathIterator

Attributes

Inherited from:
Double
final def getWindingRule(): Int

Attributes

Inherited from:
Path2D
final def intersects(x$0: Rectangle2D): Boolean

Attributes

Inherited from:
Path2D
final def intersects(x$0: Double, x$1: Double, x$2: Double, x$3: Double): Boolean

Attributes

Inherited from:
Path2D
final def lineTo(x$0: Double, x$1: Double): Unit

Attributes

Inherited from:
Double
final def moveTo(x$0: Double, x$1: Double): Unit

Attributes

Inherited from:
Double
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 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
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def quadTo(x$0: Double, x$1: Double, x$2: Double, x$3: Double): Unit

Attributes

Inherited from:
Double
final def reset(): Unit

Attributes

Inherited from:
Path2D
def setLine(p1: VectorD, pc: VectorD, p2: VectorD): Unit

Attributes

Inherited from:
CurvilinearShape
def setLine(p1: VectorD, p2: VectorD, bend: Double): Unit

Attributes

Inherited from:
CurvilinearShape
def setLine(p1: VectorD, p2: VectorD): Unit

Attributes

Inherited from:
CurvilinearShape
final def setWindingRule(x$0: Int): Unit

Attributes

Inherited from:
Path2D
final def transform(x$0: AffineTransform): Unit

Attributes

Inherited from:
Double
final def trimToSize(): Unit

Attributes

Inherited from:
Double