trait PhiRectangle extends Rectangle
Golden rectangle, a rectangle whose side lengths are in the golden ratio, 1 : 1 + 5 2 {\displaystyle 1:{\tfrac {1+{\sqrt {5 }}} {2 }}} 1:{\tfrac {1+{\sqrt {5 }}} {2}}, which is 1 : φ {\displaystyle 1:\varphi } 1:\varphi (the Greek letter phi), where φ {\displaystyle \varphi } \varphi is approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square. {1+{\sqrt {5 }}} approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square. {2 }}} {1+{\sqrt {5 }}} {2}}, which is 1 : φ {\displaystyle 1:\varphi } 1:\varphi (the Greek letter phi), where φ {\displaystyle \varphi } \varphi is approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square. {1+{\sqrt {5 }}} approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square. Golden rectangle, a rectangle whose side lengths are in the golden ratio, 1 : 1 + 5 2 {\displaystyle 1:{\tfrac {1+{\sqrt {5 }}} {1+{\sqrt {5 }}} {2}}, which is 1 : φ {\displaystyle 1:\varphi } 1:\varphi (the Greek letter phi), where φ {\displaystyle \varphi } \varphi is approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square. {1+{\sqrt {5 }}} approximately 1.618. Golden rectangles exhibit a special form of self-similarity: All rectangles created by adding or removing a square are Golden rectangles as well. A method to construct a golden rectangle. Owing to the Pythagorean theorem,[a] the diagonal dividing one half of a square equals the radius of a circle whose outermost point is also the corner of a golden rectangle added to the square.
- Alphabetic
- By Inheritance
- PhiRectangle
- Rectangle
- Polygon4Plus
- Polygon3Plus
- Polygon
- PolygonLike
- Approx
- Equals
- ShapeCentred
- CentredElem
- WithCentre
- Shape
- BoundedElem
- Fillable
- Drawable
- GeomElem
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def alignAngle: AngleVec
- Definition Classes
- Rectangle
- abstract def cen: Pt2
The centre of this geometric / graphical element.
The centre of this geometric / graphical element. The centre will not change if the object type is capable of being rotated and is rotated. The cenDefault on other bounded elements may move relative to points on the object when the object is rotated.
- Definition Classes
- WithCentre
- abstract def cenX: Double
The X component of the centre.
The X component of the centre.
- Definition Classes
- WithCentre
- abstract def cenY: Double
The Y component of the centre.
The Y component of the centre.
- Definition Classes
- WithCentre
- abstract def sd1Cen: Pt2
The centre or half way point of side 1 of this polygon.
The centre or half way point of side 1 of this polygon. Side 1 starts at the vLast vertex and ends at the v1 vertex. This can be thought of as vertex 0.5.
- Definition Classes
- Polygon3Plus
- abstract def sd1CenX: Double
The X component of the centre or half way point of side 1 of this polygon.
The X component of the centre or half way point of side 1 of this polygon. Side 1 starts at the vLast vertex and ends at the v1 vertex. This can be thought of as vertex 0.5.
- Definition Classes
- Polygon3Plus
- abstract def sd1CenY: Double
The Y component of the centre or half way point of side 1 of this polygon.
The Y component of the centre or half way point of side 1 of this polygon. Side 1 starts at the vLast vertex and ends at the v1 vertex. This can be thought of as vertex 0.5.
- Definition Classes
- Polygon3Plus
- abstract def sd2Cen: Pt2
The centre or half way point of side 2 of this polygon.
The centre or half way point of side 2 of this polygon. Side 2 starts at the v1 vertex and ends at the v2 vertex. This can be thought of as vertex 1.5
- Definition Classes
- Polygon3Plus
- abstract def sd2CenX: Double
The X component of the centre or half way point of side 2 of this polygon.
The X component of the centre or half way point of side 2 of this polygon. Side 2 starts at the v1 vertex and ends at the v1 vertex. This can be thought of as vertex 1.5.
- Definition Classes
- Polygon3Plus
- abstract def sd2CenY: Double
The Y component of the centre or half way point of side 3 of this polygon.
The Y component of the centre or half way point of side 3 of this polygon. Side 2 starts at the v1 vertex and ends at the v2 vertex. This can be thought of as vertex 1.5.
- Definition Classes
- Polygon3Plus
- abstract def sd3Cen: Pt2
The centre or half way point of side 3 of this polygon.
The centre or half way point of side 3 of this polygon. Side 3 starts at the v2 vertex and ends at the v3 vertex. This can be thought of as vertex 2.5.
- Definition Classes
- Polygon3Plus
- abstract def sd3CenX: Double
The X component of the centre or half way point of side 3 of this polygon.
The X component of the centre or half way point of side 3 of this polygon. Side 3 starts at the v2 vertex and ends at the v3 vertex. This can be thought of as vertex 2.5.
- Definition Classes
- Polygon3Plus
- abstract def sd3CenY: Double
The Y component of the centre or half way point of side 3 of this polygon.
The Y component of the centre or half way point of side 3 of this polygon. Side 3 starts at the v2 vertex and ends at the v3 vertex. This can be thought of as vertex 2.5.
- Definition Classes
- Polygon3Plus
- abstract def sd4Cen: Pt2
The centre or half way point of side 4 of this polygon.
The centre or half way point of side 4 of this polygon. Side 4 starts at the v3 vertex and ends at the v4 vertex. This can be thought of as vertex 3.5.
- Definition Classes
- Polygon4Plus
- abstract def sd4CenX: Double
The X component of the centre or half way point of side 4 of this polygon.
The X component of the centre or half way point of side 4 of this polygon. Side 4 starts at the v3 vertex and ends at the v4 vertex. This can be thought of as vertex 3.5.
- Definition Classes
- Polygon4Plus
- abstract def sd4CenY: Double
The Y component of the centre or half way point of side 4 of this polygon.
The Y component of the centre or half way point of side 4 of this polygon. Side 4 starts at the v3 vertex and ends at the v4 vertex. This can be thought of as vertex 3.5.
- Definition Classes
- Polygon4Plus
- abstract def v1: Pt2
The 1st vertex, will throw on a 0 vertices polygon.
The 1st vertex, will throw on a 0 vertices polygon.
- Definition Classes
- Polygon
- abstract def v1x: Double
The X component of the 1st vertex, will throw on a 0 vertices polygon.
The X component of the 1st vertex, will throw on a 0 vertices polygon.
- Definition Classes
- Polygon
- abstract def v1y: Double
The Y component of the 1st vertex, will throw on a 0 vertices polygon.
The Y component of the 1st vertex, will throw on a 0 vertices polygon.
- Definition Classes
- Polygon
- abstract def v2: Pt2
The 2nd Vertex.
The 2nd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v2x: Double
The X component of the 2nd Vertex.
The X component of the 2nd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v2y: Double
The Y component of the 2nd Vertex.
The Y component of the 2nd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v3: Pt2
The 3rd Vertex.
The 3rd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v3x: Double
The X component of the 3rd Vertex.
The X component of the 3rd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v3y: Double
The Y component of the 3rd Vertex.
The Y component of the 3rd Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon3Plus
- abstract def v4: Pt2
The 4th Vertex.
The 4th Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon4Plus
- abstract def v4x: Double
The X component of the 4th Vertex.
The X component of the 4th Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon4Plus
- abstract def v4y: Double
The Y component of the 4th Vertex.
The Y component of the 4th Vertex. The default convention is for the vertices to be numbered in a clockwise direction with the 1st vertex immediately clockwise from 12 o'clock.
- Definition Classes
- Polygon4Plus
- abstract def width2: Double
length from v2 to v3 and v03 to v1.
length from v2 to v3 and v03 to v1.
- Definition Classes
- Rectangle
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def active(id: Any): PolygonActive
- Definition Classes
- Polygon
- def activeChildren(id: Any, children: GraphicElems): PolygonCompound
- Definition Classes
- Polygon
- def approx(that: Any, precision: Double): Boolean
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attribs: Arr[XANumeric]
- def blBounding: Pt2
- Definition Classes
- BoundedElem
- final def boundCen: Pt2
The centre of the bounding rectangle.
The centre of the bounding rectangle. consider also using cenDefault.
- Definition Classes
- BoundedElem
- Annotations
- @inline()
- def boundingHeight: Double
- Definition Classes
- BoundedElem
- def boundingRect: BoundingRect
Currently throws, not sure if that is the correct behaviour.
Currently throws, not sure if that is the correct behaviour. Creates a bounding rectangle for a collection of 2d points
- Definition Classes
- Polygon → BoundedElem
- def boundingWidth: Double
The width of the BoundingRect of this object.
The width of the BoundingRect of this object.
- Definition Classes
- BoundedElem
- def brBounding: Pt2
- Definition Classes
- BoundedElem
- def canEqual(that: Any): Boolean
This canEqual override allow the comparison of Shapes.
- final def cenDefault: Pt2
The default centre of this object is the centre.
The default centre of this object is the centre. The centre will not change if the object type is capable of being rotated and is rotated.
- Definition Classes
- CentredElem → BoundedElem
- def cenPt: Pt2
The centre point of this Polygon.
The centre point of this Polygon. The default centre for Polygons is the centre of the bounding rectangle.
- Definition Classes
- Polygon
- def cenVec: Vec2
- Definition Classes
- Polygon
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def diag1: LineSeg
- Definition Classes
- Rectangle
- def diag2: LineSeg
- Definition Classes
- Rectangle
- def diags: LineSegs
- Definition Classes
- Rectangle
- Annotations
- @inline()
- def draw(lineColour: Colour, lineWidth: Double): RectangleDraw
Draws this geometric element to produce a GraphElem graphical element, tht can be displayed or printed.
- def drawActive(lineColour: Colour = Black, lineWidth: Double = 2, pointerID: Any): PolygonCompound
- Definition Classes
- Polygon
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fill(fillColour: Colour): RectangleFill
Returns a fill graphic of this geometric object.
- def fillActive(fillColour: Colour, pointerID: Any): PolygonCompound
- Definition Classes
- Polygon
- def fillActiveDraw(fillColour: Colour, pointerID: Any, lineColour: Colour = Black, lineWidth: Double = 2): PolygonCompound
Creates a PolygonCompound graphic that is active with a simple 1 colour fill and has a draw graphic for the Polygon.
Creates a PolygonCompound graphic that is active with a simple 1 colour fill and has a draw graphic for the Polygon. The default values for the draw area line width of 2 and a colour of Black.
- Definition Classes
- Polygon
- def fillDraw(fillColour: Colour, lineColour: Colour, lineWidth: Double): PolygonCompound
Returns a fill and draw graphic of this geometric object.
- def fillDrawActive(fillColour: Colour, pointerID: Any, lineWidth: Double, lineColour: Colour = Black): PolygonCompound
- Definition Classes
- Polygon
- def fillDrawText(fillColour: Colour, str: String, fontSize: Int = 24, lineColour: Colour = Black, lineWidth: Double = 2.0): PolygonCompound
- Definition Classes
- Polygon
- def fillDrawTextActive(fillColour: Colour, pointerID: Any, str: String, fontSize: Int = 24, lineWidth: Double, lineColour: Colour = Black, align: TextAlign = CenAlign): PolygonCompound
- Definition Classes
- Polygon
- def fillInt(intValue: Int): RectangleFill
Returns a fill graphic of this geometric object from the Int RGBA value.
- def fillText(fillColour: Colour, str: String, fontSize: Int = 10, textColour: Colour = Black, layer: Int = 0): PolygonCompound
- Definition Classes
- Polygon
- def fillTextActive(fillColour: Colour, pointerEv: Any, str: String, fontSize: Int = 24, fontColour: Colour = Black, align: TextAlign = CenAlign): PolygonCompound
- Definition Classes
- Polygon
- final def foreachVert[U](f: (Pt2) => U): Unit
Performs the side effecting function on the Pt2 value of each vertex.
Performs the side effecting function on the Pt2 value of each vertex.
- Definition Classes
- Rectangle → Polygon → PolygonLike
- def foreachVertPairTail[U](f: (Double, Double) => U): Unit
Foreach vertex excluding vertex 1, perform the side effecting function on the Tuple2 of the x and y values of the vertex.
- final def foreachVertTail[U](f: (Pt2) => U): Unit
Performs the side effecting function on the Pt2 value of each vertex, excluding vertex v1.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def heightAttrib: HeightAtt
- Definition Classes
- Rectangle
- def insVert(insertionPoint: Int, newVec: Pt2): Polygon
Insert vertex.
Insert vertex.
- Definition Classes
- Polygon
- def insVerts(insertionPoint: Int, newVecs: Pt2*): Polygon
Insert vertices before the specified insertion vertex.
Insert vertices before the specified insertion vertex.
- Definition Classes
- Polygon
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negX: PhiRectangle
Mirror, reflection transformation across the X axis on a PhiRectangle, returns a PhiRectangle.
- def negY: PhiRectangle
Mirror, reflection transformation across the X axis on a PhiRectangle, returns a PhiRectangle.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def parentFillText(pointerID: Any, fillColour: Colour, str: String, fontSize: Int = 10, textColour: Colour = Black, align: TextAlign = CenAlign): PolygonCompound
- Definition Classes
- Polygon
- def polygonMap(f: (Pt2) => Pt2): Polygon
- Definition Classes
- Polygon
- Annotations
- @inline()
- def precisionDefault: Double
- def prolign(matrix: ProlignMatrix): PhiRectangle
Prolign 2d transformations, similar transformations that retain alignment with the axes.
- def ptInside(pt: Pt2): Boolean
Determines if the parameter point lies inside this Polygon.
Determines if the parameter point lies inside this Polygon.
- Definition Classes
- Polygon
- def reflect(lineLike: LineLike): PhiRectangle
Reflect 2D geometric transformation across a line, line segment or ray on a polygon, returns a Polygon.
- def rotate(angle: AngleVec): PhiRectangle
Rotation 2D geometric transformation on a Polygon, taking the rotation as a scalar measured in radians, returns a Polygon.
- def rotate180: Rectangle
Rotation of 180 degrees, 2D geometric transformation on a Drawable, returns a Drawable.
- def rotate270: Rectangle
Rotation positive or anti clockwise 270 degrees, 2D geometric transformation on a Drawable, returns a Drawable.
- def rotate90: Rectangle
Rotation positive or anti clockwise 90 degrees, 2D geometric transformation on a Drawable, returns a Drawable.
- def scale(operand: Double): PhiRectangle
Uniform scaling transformation on a PhiRectangle returns a PhiRectangle.
- def scaleXY(xOperand: Double, yOperand: Double): Rectangle
XY scaling 2D geometric transformation on a Polygon returns a Polygon.
- def sd1: LineSeg
Polygon side 1 from the last vertex to Vertex 1.
Polygon side 1 from the last vertex to Vertex 1.
- Definition Classes
- Polygon3Plus
- def sd2: LineSeg
Polygon side 2 from vertex 1 to vertex 2.
Polygon side 2 from vertex 1 to vertex 2.
- Definition Classes
- Polygon3Plus
- def sd3: LineSeg
Polygon side 3 from v2 to v3.
Polygon side 3 from v2 to v3.
- Definition Classes
- Polygon3Plus
- def shearX(operand: Double): Polygon
Shear 2D geometric transformation along the X Axis on a Polygon, returns a Polygon.
- def shearY(operand: Double): Polygon
Shear 2D geometric transformation along the Y Axis on a Polygon, returns a Polygon.
- def side(index: Int): LineSeg
- Definition Classes
- Polygon
- Annotations
- @inline()
- def sideForeach(f: (LineSeg) => Unit): Unit
foreachs over the sides or edges of the Polygon These are of type LineSeg.
- def sideIForeach(initCount: Int = 0)(f: (LineSeg, Int) => Unit): Unit
foreachs over the sides or edges of the Polygon These are of type LineSeg.
- def sidesIFlatMap[AA <: ArrImut[_]](initCount: Int = 0)(f: (LineSeg, Int) => AA)(implicit build: ArrTFlatBuilder[AA]): AA
maps with a integer counter over the sides or edges of the Polygon These are of type LineSeg.
- def sidesIMap[A, AA <: ArrImut[A]](initCount: Int = 0)(f: (LineSeg, Int) => A)(implicit build: ArrTBuilder[A, AA]): AA
maps with a integer counter over the sides or edges of the Polygon These are of type LineSeg.
- def sidesMap[A, AA <: ArrImut[A]](f: (LineSeg) => A)(implicit build: ArrTBuilder[A, AA]): AA
maps over the sides or edges of the Polygon These are of type LineSeg.
- def slate(offset: Vec2Like): PhiRectangle
Translate geometric transformation on a PhiRectangle returns a PhiRectangle.
Translate geometric transformation on a PhiRectangle returns a PhiRectangle.
- Definition Classes
- PhiRectangle → Rectangle → Polygon
- def slateXY(xDelta: Double, yDelta: Double): PhiRectangle
Translate geometric transformation on a PhiRectangle returns a PhiRectangle.
- def sline(index: Int): LineSeg
- Definition Classes
- Polygon
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tlBounding: Pt2
- Definition Classes
- BoundedElem
- def toLineSegs: LineSegs
Converts this closed Polygon to LineSegs.
Converts this closed Polygon to LineSegs. The LineSegs collection is empty of there are less than 2 vertices.
- Definition Classes
- Polygon
- def toString(): String
- Definition Classes
- AnyRef → Any
- def trBounding: Pt2
- Definition Classes
- BoundedElem
- def vLast: Pt2
The last vertex.
The last vertex.
- Definition Classes
- Polygon3Plus → Polygon
- final def vert(index: Int): Pt2
Returns the vertex of the given index.
- def vertsArray: Array[Double]
The vertices of this Polygon in an Array of Doubles.
- final def vertsArrayX: Array[Double]
The X component of the vertices of this Polygon in an Array of Doubles.
- final def vertsArrayY: Array[Double]
The Y component of the vertices of this Polygon in an Array of Doubles.
- def vertsFoldLeft[B](initial: B)(f: (B, Pt2) => B): B
- Definition Classes
- Polygon
- def vertsIFlatMap[BB <: ArrImut[_]](iInit: Int = 0)(f: (Pt2, Int) => BB)(implicit build: ArrTFlatBuilder[BB]): BB
flatMap with index to an immutable Arr.
flatMap with index to an immutable Arr.
- Definition Classes
- Polygon
- def vertsMap[A, ArrT <: ArrImut[A]](f: (Pt2) => A)(implicit build: ArrTBuilder[A, ArrT]): ArrT
- Definition Classes
- Polygon
- final def vertsNum: Int
The number of vertices and also the number of sides in this Polygon.
- def vertsTrans(f: (Pt2) => Pt2): Polygon
A function that takes a 2D geometric transformation on a Pt2 as a parameter and performs the transformation on all the vertices returning a new transformed Polygon
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def width1: Double
length from v1 to v2 and v3 to v4.
length from v1 to v2 and v3 to v4.
- Definition Classes
- PhiRectangle → Rectangle
- def widthAttrib: WidthAtt
- Definition Classes
- Rectangle
- def xAttrib: XAttrib
- Definition Classes
- Rectangle
- def xVert(index: Int): Double
Returns the X component of the vertex of the given number.
- def yAttrib: YAttrib
- Definition Classes
- Rectangle
- def yVert(index: Int): Double
Returns the Y component of the vertex of the given number.