Line

ostrat.geom.Line
sealed trait Line extends LineLike

An infinite length 2-dimensional straight line trait. Note this is the mathematical definition of a line. In SVG and other APIs the name line is used for a line segment, which in openstrat is called a LSeg2

Attributes

Graph
Supertypes
trait LineLike
trait Aff2Elem
trait Simil2Elem
trait Axlign2Elem
class Object
trait Matchable
class Any
Show all
Known subtypes
class XLine
class XParallel
object XAxis
object YAxis
trait XorYAxis
class YLine
class YParallel
Show all

Members list

Value members

Abstract methods

def reflectPt(pt: Pt2): Pt2

Reflects, mirrors a point across this line.

Reflects, mirrors a point across this line.

Attributes

override def slate(xOperand: Double, yOperand: Double): Line

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
override def slateX(xOperand: Double): Line

Translate 2D geometric transformation in the X dimension, returning a GeomElem. The Return type will be narrowed in sub traits.

Translate 2D geometric transformation in the X dimension, returning a GeomElem. The Return type will be narrowed in sub traits.

Attributes

Definition Classes
override def slateY(yOperand: Double): Line

Translate 2D geometric transformation in the Y dimension, returning a GeomElem. The Return type will be narrowed in sub traits.

Translate 2D geometric transformation in the Y dimension, returning a GeomElem. The Return type will be narrowed in sub traits.

Attributes

Definition Classes

Concrete methods

override def negX: Line

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
override def negY: Line

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
override def prolign(matrix: AxlignMatrix): Line

Transforms this Line using a AxlignMatrix.

Transforms this Line using a AxlignMatrix.

Attributes

Definition Classes
override def reflect(lineLike: LineLike): Line

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

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

Attributes

Definition Classes
override def rotate(rotation: AngleVec): Line

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

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

Attributes

Definition Classes
override def rotate180: Line

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

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

Attributes

Definition Classes
override def rotate270: Line

Rotation positive or anti-clockwise 270 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in subclasses 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 subclasses and traits.

Attributes

Definition Classes
override def rotate90: Line

Rotation positive or anti-clockwise 90 degrees, 2D geometric transformation on a GeomElem, returns a GeomElem. The return type will be narrowed in subclasses 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 subclasses and traits.

Attributes

Definition Classes
override def scale(operand: Double): Line

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
override def scaleXY(xOperand: Double, yOperand: Double): Line

Scaling X and Y axes independently, 2D geometric transformation on this Aff2Elem, returns a new Aff2Elem. This allows different scaling factors across X and Y dimensions. The return type will be narrowed in subclasses 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 Aff2Elem, returns a new Aff2Elem. This allows different scaling factors across X and Y dimensions. The return type will be narrowed in subclasses and traits. This is an affine transformation, but it is not a similar transformation.

Attributes

Definition Classes
override def shearX(operand: Double): Line

Shear 2D geometric transformation along the X Axis on a GeomElem. The return type will be narrowed in subclasses 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 subclasses and traits. This is an affine transformation, but it is not a similar transformation.

Attributes

Definition Classes
override def shearY(operand: Double): Line

Shear 2D geometric transformation along the Y Axis on a GeomElem. The return type will be narrowed in subclasses 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 subclasses and traits. This is an affine transformation, but it is not a similar transformation.

Attributes

Definition Classes
override def slate(operand: VecPt2): Line

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