Rectangle

data class Rectangle(val x: Double, val y: Double, val width: Double, val height: Double) : SimpleShape2D, IsAlmostEquals<Rectangle>

Constructors

Link copied to clipboard
constructor(x: Double, y: Double, width: Double, height: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val area: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val center: Point
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val closed: Boolean = true
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val perimeter: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Size
Link copied to clipboard
val top: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val x: Double
Link copied to clipboard
val y: Double

Functions

Link copied to clipboard
fun Rectangle.applyScaleMode(container: Rectangle, mode: ScaleMode, anchor: Anchor): Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun contains(that: Point): Boolean
operator fun contains(that: Vector2F): Boolean
operator fun contains(that: Vector2I): Boolean
fun contains(x: Int, y: Int): Boolean
Link copied to clipboard
open override fun containsPoint(p: Point): Boolean
Link copied to clipboard
fun copyBounds(left: Double = this.left, top: Double = this.top, right: Double = this.right, bottom: Double = this.bottom): Rectangle
Link copied to clipboard
open override fun distance(p: Point): Double
Link copied to clipboard
operator fun div(scale: Double): Rectangle
operator fun div(scale: Float): Rectangle
operator fun div(scale: Int): Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getBounds(): Rectangle
Link copied to clipboard
infix fun intersection(that: Rectangle): Rectangle
Link copied to clipboard
Link copied to clipboard
infix fun intersects(that: Rectangle): Boolean
Link copied to clipboard
infix fun intersectsX(that: Rectangle): Boolean
Link copied to clipboard
infix fun intersectsY(that: Rectangle): Boolean
Link copied to clipboard
open override fun isAlmostEquals(other: Rectangle, epsilon: Double): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun normalVectorAt(p: Point): Vector2D
Link copied to clipboard

Circle that touches or contains all the corners (Rectangle.topLeft, Rectangle.topRight, Rectangle.bottomLeft, Rectangle.bottomRight) of the rectangle.

Link copied to clipboard
fun Rectangle.place(item: Size, anchor: Anchor, scale: ScaleMode): Rectangle
Link copied to clipboard
open override fun projectedPoint(p: Point): Point
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun times(scale: Double): Rectangle
operator fun times(scale: Float): Rectangle
operator fun times(scale: Int): Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun with(margin: Margin): Rectangle
Link copied to clipboard
fun without(padding: Margin): Rectangle