Rect

object Rect

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

Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

final case class RectImp(width: Double, height: Double, cenX: Double, cenY: 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.

Companion
object
object RectImp

Companion object for the Rect.RectImp class

Companion object for the Rect.RectImp class

Companion
class

Value members

Concrete methods

def apply(width: Double, height: Double, cen: Pt2): Rect
def apply(width: Double, height: Double, xCen: Double, cenY: Double): Rect
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.

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.

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.

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.

def colouredBordered(height: Double, colour: Colour, lineWidth: Double): PolygonCompound
def cross(width: Double, height: Double, barWidth: Double): Arr[Polygon]
def goldenRatio(height: Double): Rectangle
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.

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.

Implicits

Implicits

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