Rect

ostrat.geom.Rect
See theRect companion trait
object Rect

Companion object for the Rect trait contains factory methods for the Rect trait which delegate to the RectImp class.

Attributes

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

Members list

Type members

Classlikes

final class RectImp(val arrayUnsafe: Array[Double]) extends Rect

Implementation class for Rect, a rectangle aligned to the X and Y axes.

Implementation class for Rect, a rectangle aligned to the X and Y axes.

Attributes

Companion
object
Supertypes
trait Rect
trait Rectangle
trait Polygon4Plus
trait Polygon3Plus
trait Polygon
trait PolygonLike[Pt2]
trait Pt2SeqSpec
trait SeqSpecDbl2[Pt2]
trait SeqSpecDblN[Pt2]
trait SeqSpec[Pt2]
trait Pt2SeqLike
trait SeqLikeDbl2[Pt2]
trait SeqLikeDblN[Pt2]
trait SpecialT
trait PointSeqLike[Pt2]
trait SeqLike[Pt2]
trait Approx[Double]
trait Equals
trait ShapeCentred
trait CentredElem
trait WithCentre
trait Shape
trait BoundedElem
trait Fillable
trait Drawable
trait GeomElem
class Object
trait Matchable
class Any
Show all
object RectImp

Companion object for the Rect.RectImp class

Companion object for the Rect.RectImp class

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
RectImp.type

Value members

Concrete methods

def apply(width: Double, height: Double, cen: Pt2): Rect

Factory apply method for a rectangle aligned with the X and Y axes. Default height is 1 and default cebtre point is at x = 0, y = 0. There is a name overload that takes the X and Y centre coordinates as Doubles.

Factory apply method for a rectangle aligned with the X and Y axes. Default height is 1 and default cebtre point is at x = 0, y = 0. There is a name overload that takes the X and Y centre coordinates as Doubles.

Attributes

def apply(width: Double, height: Double, cenX: Double, cenY: Double): Rect

Factory apply method for a rectangle aligned with the X and Y axes. There is a name overload that has a default height of 1 and takes a Pt2 centre point paremeter wth a default of x = 0, y = 0.

Factory apply method for a rectangle aligned with the X and Y axes. There is a name overload that has a default height of 1 and takes a Pt2 centre point paremeter wth a default of x = 0, y = 0.

Attributes

def bCen(width: Double, height: Double, bottomCentre: Pt2): Rect

Factory method for Rect from width, height and the bottomCentre position parameters. The default position for the bottomCentre parameter places the bottom centre of the Rect at the origin.

Factory method for Rect from width, height and the bottomCentre position parameters. The default position for the bottomCentre parameter places the bottom centre of the Rect at the origin.

Attributes

def bl(width: Double, height: Double, bottomLeft: Pt2): Rect

Factory method for Rect from width, height and the bottomLeft position parameters. The default position for the bottomLeft parameter places the bottom left vertex of the Rect at the origin.

Factory method for Rect from width, height and the bottomLeft position parameters. The default position for the bottomLeft parameter places the bottom left vertex of the Rect at the origin.

Attributes

def bounding(inp: Arr[_]): Rect
def br(width: Double, height: Double, bottomRight: Pt2): Rect

Factory method for Rect from width, height and the topLeft position parameters. The default position for the bottomRight parameter places the bottom right vertex of the Rect at the origin.

Factory method for Rect from width, height and the topLeft position parameters. The default position for the bottomRight parameter places the bottom right vertex of the Rect at the origin.

Attributes

def cenV0(cen: Pt2, v0: Pt2): Rect

Factory method to create a Rect from the centre point and the v0 point. The v0 point or vertex is y convention the top left vertex of the rectangle, but any of the 4 corner vertices will give the correct constructor values.

Factory method to create a Rect from the centre point and the v0 point. The v0 point or vertex is y convention the top left vertex of the rectangle, but any of the 4 corner vertices will give the correct constructor values.

Attributes

def colouredBordered(height: Double, colour: Colour, lineWidth: Double): PolygonCompound
def cross(width: Double, height: Double, barWidth: Double): RArr[Polygon]
def fromArray(array: Array[Double]): Rect

Creates a Rect from an Array[Double]

Creates a Rect from an Array[Double]

Attributes

def goldenRatio(height: Double): Rectangle
def lrbt(left: Double, right: Double, bottom: Double, top: Double): Rect

Construct a Rect from the left, right, bottom and top values."

Construct a Rect from the left, right, bottom and top values."

Attributes

def tl(width: Double, height: Double, topLeft: Pt2): Rect

Factory method for Rect from width, height and the topLeft position parameters. The default position for the topLeft parameter places the top left vertex of the Rect at the origin.

Factory method for Rect from width, height and the topLeft position parameters. The default position for the topLeft parameter places the top left vertex of the Rect at the origin.

Attributes

def tr(width: Double, height: Double, topRight: Pt2): Rect

Factory method for Rect from width, height and the topRight position parameters. The default position for the topLeft parameter places the top right vertex of the Rect at the origin.

Factory method for Rect from width, height and the topRight position parameters. The default position for the topLeft parameter places the top right vertex of the Rect at the origin.

Attributes

Implicits

Implicits

implicit lazy val defaultEv: DefaultValue[Rect]

The implicit DefaultValue type class instace / evidence for Rect is the NoBounds object.

The implicit DefaultValue type class instace / evidence for Rect is the NoBounds object.

Attributes

implicit val prolignImplicit: Prolign[Rect]
implicit val scaleImplicit: Scale[Rect]
implicit val slateImplicit: Slate[Rect]