CurvilinearShape

scalation.scala2d.CurvilinearShape
trait CurvilinearShape extends Shape

The CurvilinearShape trait provides a general type for lines and curves. It is analogous to RectangularShape.

Attributes

Graph
Supertypes
trait Shape
class Object
trait Matchable
class Any
Known subtypes
class Arrow
class QArrow
class QCurve

Members list

Value members

Abstract methods

def getCenterX: Double

Get the x-coordinate of the center of a line/curve. This method must be implemented by all classes mixing in this trait.

Get the x-coordinate of the center of a line/curve. This method must be implemented by all classes mixing in this trait.

Attributes

def getCenterY: Double

Get the y-coordinate of the center of a line/curve. This method must be implemented by all classes mixing in this trait.

Get the y-coordinate of the center of a line/curve. This method must be implemented by all classes mixing in this trait.

Attributes

def setLine(p1: R2, p2: R2): Unit

Set (or reset) the location for a straight line. This method must be implemented by all classes mixing in this trait.

Set (or reset) the location for a straight line. This method must be implemented by all classes mixing in this trait.

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 a line/curve using the bend parameter to compute the control point. This method must be implemented by all classes mixing in this trait.

Set (or reset) the location for a line/curve using the bend parameter to compute the control point. This method must be implemented by all classes mixing in this trait.

Value parameters

bend

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

p1

the starting point

p2

the ending point

Attributes

Concrete methods

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

def setLine(p1: VectorD, p2: VectorD): Unit
def setLine(p1: VectorD, p2: VectorD, bend: Double): Unit
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

def setLine(p1: VectorD, pc: VectorD, p2: VectorD): Unit

Inherited and Abstract methods

def contains(x$0: Rectangle2D): Boolean

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
Shape
def getBounds(): Rectangle

Attributes

Inherited from:
Shape
def getBounds2D(): Rectangle2D

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
Shape