Arrow

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

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

Concrete methods

def getCenterX: Double

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

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

Attributes

def getCenterY: Double

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

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

Attributes

def setLine(_p1: R2, _p2: R2): Unit

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

def setLine(_p1: R2, _p2: R2, bend: Double): Unit

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

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: R2, pc: R2, p2: R2): Unit

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