Rectangle

ostrat.geom.Rectangle
See theRectangle companion trait
object Rectangle

Companion object for the Rectangle trait. Contains Rectangle.RectangleGen the implementation class for non-specialised rectangles. It also contains various factory methods that delegate to the Rectangle.RectangleGen class.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rectangle.type

Members list

Type members

Classlikes

final class RectangleGen(val v0x: Double, val v0y: Double, val v1x: Double, val v1y: Double, val v2x: Double, val v2y: Double) extends Rectangle

A rectangle class that has position and may not be aligned to the X and Y axes.

A rectangle class that has position and may not be aligned to the X and Y axes.

Attributes

Companion
object
Supertypes
trait Rectangle
trait Polygon4Plus
trait Polygon3Plus
trait Polygon
trait PolygonBase[Pt2]
trait VertSeqSpec[Pt2]
trait SeqSpec[Pt2]
trait SeqLike[Pt2]
trait Approx[Double]
trait Equals
trait ShapeCentred
trait CentredElem
trait WithCentre
trait Shape
trait BoundedElem
trait Fillable
trait Drawable
trait Aff2Elem
trait Simil2Elem
trait Axlign2Elem
class Object
trait Matchable
class Any
Show all
object RectangleGen

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def apply(width: Double, height: Double, rotation: AngleVec, cen: Pt2): Rectangle

apply factory method for rectangle takes the width, height, rotation from alignment with the axes and a centre point. the default value for the centre point is the origin.

apply factory method for rectangle takes the width, height, rotation from alignment with the axes and a centre point. the default value for the centre point is the origin.

Attributes

def axis1(sd4Cen: Pt2, sd2Cen: Pt2, height: Double): Rectangle

Creates a Rectangle from axis 1. The default for axis 1 is the left right axis.

Creates a Rectangle from axis 1. The default for axis 1 is the left right axis.

Attributes

def curvedCorners(width: Double, height: Double, radius: Double, cen: Pt2): ShapeGenOld

Creates Rectangle from 2 vectors and centre point. The 2 vectors are the half axies from the centre point to th e right and to the top.

Creates Rectangle from 2 vectors and centre point. The 2 vectors are the half axies from the centre point to th e right and to the top.

Attributes

def curvedCornersCentred(width: Double, height: Double, radius: Double, posn: Pt2): PolyCurveCentred
def curvedGoldenRatio(height: Double, radius: Double, posn: Pt2): ShapeGenOld
def from3(vt0: Pt2, vt1: Pt2, vt2: Pt2): Rectangle

Factory apply method to create Rectangle from its first 3 vertices.

Factory apply method to create Rectangle from its first 3 vertices.

Attributes

def fromAxis(centreLine: LSeg2, height: Double): PolygonGen
def fromAxisRatio(centreLine: LSeg2, ratio: Double): PolygonGen
def vecsCen(rtVec: Vec2, upVec: Vec2, cen: Pt2): Rectangle

Givens

Givens

Implicit Prolign type class instance evidence for Rectangle.

Implicit Prolign type class instance evidence for Rectangle.

Attributes

Implicit Reflect type class instance evidence for Rectangle.

Implicit Reflect type class instance evidence for Rectangle.

Attributes

Implicit Rotate type class instance evidence for Rectangle.

Implicit Rotate type class instance evidence for Rectangle.

Attributes

Implicit Scale type class instance evidence for Rectangle.

Implicit Scale type class instance evidence for Rectangle.

Attributes

Implicit Slate2 type class instance evidence for Rectangle.

Implicit Slate2 type class instance evidence for Rectangle.

Attributes

Implicit TransAxes type class instance evidence for Rectangle.

Implicit TransAxes type class instance evidence for Rectangle.

Attributes