BoundaryShape

sealed class BoundaryShape

Abstract Boundary shape

Functions

area
Link copied to clipboard
fun area(): Double
Get area of of shape
clone
Link copied to clipboard
abstract fun clone(): BoundaryShape
Clone
coordInShape
Link copied to clipboard
fun coordInShape(x: Double, y: Double): Boolean
Check if coordinate is in shape
corners
Link copied to clipboard
fun corners(): List<Pair<Double, Double>>
List of 4 corners
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
offsetHeight
Link copied to clipboard
fun offsetHeight(offset: Int = 1): BoundaryShape
Offset height
offsetWidth
Link copied to clipboard
fun offsetWidth(offset: Int = 1): BoundaryShape
Offset width
overlapsShape
Link copied to clipboard
fun overlapsShape(otherShape: BoundaryShape): Boolean
Overlaps Shape
positioning
Link copied to clipboard
fun positioning(): PositionProperties
Returns position property of shape
setCoords
Link copied to clipboard
abstract fun setCoords(x: Double, y: Double): BoundaryShape
Set coords
shiftHorizontalToRight
Link copied to clipboard
fun shiftHorizontalToRight(offset: Double): BoundaryShape
Shift horizontal to right
shiftVerticalUpwards
Link copied to clipboard
fun shiftVerticalUpwards(offset: Double): BoundaryShape
Shift vertical upwards
toString
Link copied to clipboard
open fun toString(): String

Properties

canCentralise
Link copied to clipboard
var canCentralise: Boolean = true
: boolean to decide whether the shape can be centralised (code and variable block cannot for example)
dynamicHeight
Link copied to clipboard
abstract val dynamicHeight: Boolean
dynamicWidth
Link copied to clipboard
abstract val dynamicWidth: Boolean
height
Link copied to clipboard
abstract var height: Double
maxSize
Link copied to clipboard
abstract var maxSize: Int
minDimensions
Link copied to clipboard
abstract val minDimensions: Pair<Double, Double>
strictRatio
Link copied to clipboard
abstract val strictRatio: Boolean
width
Link copied to clipboard
abstract var width: Double
x1
Link copied to clipboard
var x1: Double = 0.0
: x coordinate of lower left corner for boundary
y1
Link copied to clipboard
var y1: Double = 0.0
: y coordinate of lower left corner for boundary

Inheritors

SquareBoundary
Link copied to clipboard
TallBoundary
Link copied to clipboard
WideBoundary
Link copied to clipboard