Square

ostrat.geom.Square
See theSquare companion trait
object Square extends ShapeIcon

Companion object for the Square trait. However its apply methods delegate to the SquareImp implementation class.

Attributes

Companion
trait
Graph
Supertypes
trait ShapeIcon
class Object
trait Matchable
class Any
Self type
Square.type

Members list

Type members

Classlikes

final class SquareImp(val arrayUnsafe: Array[Double]) extends Square

The class for a generalised square. If you want a square aligned XY axes use Sqlign. The square can be translated, scaled, reflected and rotated while remaining a Square.

The class for a generalised square. If you want a square aligned XY axes use Sqlign. The square can be translated, scaled, reflected and rotated while remaining a Square.

Attributes

Supertypes
trait Square
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

Types

override type ShapeT = Sqlign

Value members

Concrete methods

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

Factory method for the creation of [Squares in the general case where the square is not aligned to the X and Y axis. The method takes the square's scalar width followed by its rotation specified in AngleVec. If no further arguments are supplied the square will positioned with its centre at the axes centre. Otherwise the rotation can be followed by a centre point Pt2 or the X and Y positions of the square's centre. If you want to create a square aligned to the axes, then you are probably better using the Sqlign factory apply method.

Factory method for the creation of [Squares in the general case where the square is not aligned to the X and Y axis. The method takes the square's scalar width followed by its rotation specified in AngleVec. If no further arguments are supplied the square will positioned with its centre at the axes centre. Otherwise the rotation can be followed by a centre point Pt2 or the X and Y positions of the square's centre. If you want to create a square aligned to the axes, then you are probably better using the Sqlign factory apply method.

Attributes

def apply(width: Double, rotation: AngleVec, xCen: Double, yCen: Double): Square

Factory method for the creation of [Squares in the general case where the square is not aligned to the X and Y axis. The method takes the square's scalar width followed by its rotation specified in AngleVec. If no further arguments are supplied the square will positioned with its centre at the axes centre. Otherwise the rotation can be followed by a centre point Pt2 or the X and Y positions of the square's centre. If you want to create a square aligned to the axes, then you are probably better using the Sqlign factory apply method.

Factory method for the creation of [Squares in the general case where the square is not aligned to the X and Y axis. The method takes the square's scalar width followed by its rotation specified in AngleVec. If no further arguments are supplied the square will positioned with its centre at the axes centre. Otherwise the rotation can be followed by a centre point Pt2 or the X and Y positions of the square's centre. If you want to create a square aligned to the axes, then you are probably better using the Sqlign factory apply method.

Attributes

override def fill(colour: Colour): ShapeGraphicIcon

Attributes

Definition Classes
override def reify(scale: Double, xCen: Double, yCen: Double): Sqlign

Scale the Square and position (translate) it. This method is equivalent to scaling the icon and then translating (repositioning) it.

Scale the Square and position (translate) it. This method is equivalent to scaling the icon and then translating (repositioning) it.

Attributes

Definition Classes
override def reify(scale: Double, cen: Pt2): Sqlign

Scale the Shape and position (translate) it. This method is equivalent to scaling the icon and then translating (repositioning) it.

Scale the Shape and position (translate) it. This method is equivalent to scaling the icon and then translating (repositioning) it.

Attributes

Definition Classes