Bezier

ostrat.geom.Bezier
See theBezier companion object
class Bezier(val startX: Double, val startY: Double, val xC1: Double, val yC1: Double, val xC2: Double, val yC2: Double, val endX: Double, val endY: Double) extends CurveSeg, AffinePreserve

Cubic bezier curve.

Attributes

Companion
object
Graph
Supertypes
trait CurveSeg
trait Drawable
trait GeomElem
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

override type ThisT = Bezier

The most narrow type preserved in some 2d geometric transformations.

The most narrow type preserved in some 2d geometric transformations.

Attributes

Value members

Concrete methods

def draw(lineWidth: Double, colour: Colour): BezierDraw

Draws this geometric element to produce a GraphElem graphical element, that can be displayed or printed.

Draws this geometric element to produce a GraphElem graphical element, that can be displayed or printed.

Attributes

final def pC1: Pt2
final def pC2: Pt2
def ptsTrans(f: Pt2 => Pt2): Bezier

A method to perform all the ProlignPreserve transformations with a function from PT2 => PT2.

A method to perform all the ProlignPreserve transformations with a function from PT2 => PT2.

Attributes

Inherited methods

def fillOrDraw(lineWidth: Double, colour: Colour): GraphicElem

If this element is Fillable applies the fill method, ignoring the line width parameter, else applies the draws method.

If this element is Fillable applies the fill method, ignoring the line width parameter, else applies the draws method.

Attributes

Inherited from:
Drawable
override def negX: ThisT

Mirror, reflection 2D geometric transformation across the Y axis by negating X. The return type will be narrowed in sub traits / classes.

Mirror, reflection 2D geometric transformation across the Y axis by negating X. The return type will be narrowed in sub traits / classes.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def negY: ThisT

Mirror, reflection 2D geometric transformation across the X axis by negating y. The return type will be narrowed in sub traits / classes.

Mirror, reflection 2D geometric transformation across the X axis by negating y. The return type will be narrowed in sub traits / classes.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
final def pEnd: Pt2

The end point Pt2 of this curve segment. Often called p2 on a line or p4 on a cubic bezier in other APIs.

The end point Pt2 of this curve segment. Often called p2 on a line or p4 on a cubic bezier in other APIs.

Attributes

Inherited from:
CurveSeg
final def pStart: Pt2

Start point of this curve segment, often called p1

Start point of this curve segment, often called p1

Attributes

Inherited from:
CurveSeg
override def prolign(matrix: ProlignMatrix): ThisT

2D Transformation using a ProlignMatrix. The return type will be narrowed in sub classes / traits.

2D Transformation using a ProlignMatrix. The return type will be narrowed in sub classes / traits.

Attributes

Definition Classes
Inherited from:
ProlignPreserve
override def reflect(lineLike: LineLike): ThisT

Reflect 2D geometric transformation across a line, line segment or ray on a GeomElem. The return type will be narrowed in sub classes and traits.

Reflect 2D geometric transformation across a line, line segment or ray on a GeomElem. The return type will be narrowed in sub classes and traits.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def rotate(angle: AngleVec): ThisT

Rotation 2D geometric transformation on a GeomElem. The return type will be narrowed in sub classes and traits.

Rotation 2D geometric transformation on a GeomElem. The return type will be narrowed in sub classes and traits.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def rotate180: ThisT

Rotation of 180 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Rotation of 180 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def rotate270: ThisT

Rotation positive or anti clockwise 270 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Rotation positive or anti clockwise 270 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def rotate90: ThisT

Rotation positive or anti clockwise 90 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Rotation positive or anti clockwise 90 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in sub classes and traits.

Attributes

Definition Classes
Inherited from:
SimilarPreserve
override def scale(operand: Double): ThisT

Uniform 2D geometric scaling transformation. The scale name was chosen for this operation as it is normally the desired operation and preserves Circles and Squares. Use the xyScale method for differential scaling. The Return type will be narrowed in sub traits / classes.

Uniform 2D geometric scaling transformation. The scale name was chosen for this operation as it is normally the desired operation and preserves Circles and Squares. Use the xyScale method for differential scaling. The Return type will be narrowed in sub traits / classes.

Attributes

Definition Classes
Inherited from:
ProlignPreserve
override def scaleXY(xOperand: Double, yOperand: Double): ThisT

Scaling X and Y axes independently, 2D geometric transformation on this GeomElem, returns a new GeomElem. This allows different scaling factors across X and Y dimensions. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Scaling X and Y axes independently, 2D geometric transformation on this GeomElem, returns a new GeomElem. This allows different scaling factors across X and Y dimensions. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Attributes

Definition Classes
Inherited from:
AffinePreserve
override def shearX(operand: Double): ThisT

Shear 2D geometric transformation along the X Axis on a GeomElem. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Shear 2D geometric transformation along the X Axis on a GeomElem. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Attributes

Definition Classes
Inherited from:
AffinePreserve
override def shearY(operand: Double): ThisT

Shear 2D geometric transformation along the Y Axis on a GeomElem. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Shear 2D geometric transformation along the Y Axis on a GeomElem. The return type will be narrowed in sub classes and traits. This is an affine transformation but it is not a similar transformation.

Attributes

Definition Classes
Inherited from:
AffinePreserve
override def slateXY(xDelta: Double, yDelta: Double): ThisT

Translate 2D geometric transformation, taking the xOffset and yOffset as parameters on this GeomElem returning a GeomElem. The Return type will be narrowed in sub traits. End users will often want to use the slate method taking a Pt2 or Vec2 as a parameter, the slateX or the slateY methods. These methods will be offered as extension methods using this method for their implementations.

Translate 2D geometric transformation, taking the xOffset and yOffset as parameters on this GeomElem returning a GeomElem. The Return type will be narrowed in sub traits. End users will often want to use the slate method taking a Pt2 or Vec2 as a parameter, the slateX or the slateY methods. These methods will be offered as extension methods using this method for their implementations.

Attributes

Definition Classes
Inherited from:
ProlignPreserve

Concrete fields

val endX: Double

The X component of the end point of this curve segment. Often called x2 on a line or x4 on a cubic bezier in other APIs.

The X component of the end point of this curve segment. Often called x2 on a line or x4 on a cubic bezier in other APIs.

Attributes

val endY: Double

The Y component of the end point of this curve segment. Often called y2 on a line or y4 on a cubic bezier in other APIs.

The Y component of the end point of this curve segment. Often called y2 on a line or y4 on a cubic bezier in other APIs.

Attributes

val startX: Double

The X component of the start point of this curve segment often called x1 in other APIs.

The X component of the start point of this curve segment often called x1 in other APIs.

Attributes

val startY: Double

The Y component of the start point of this curve segment, often called y1 in other APIs.

The Y component of the start point of this curve segment, often called y1 in other APIs.

Attributes

val xC1: Double
val xC2: Double
val yC1: Double
val yC2: Double