WideBoundary

data class WideBoundary(minDimensions: Pair<Double, Double>, width: Double, height: Double, maxSize: Int) : BoundaryShape

Wide boundary

Constructors

WideBoundary
Link copied to clipboard
fun WideBoundary(minDimensions: Pair<Double, Double> = Pair(4.0, 2.0), width: Double = minDimensions.first.toDouble(), height: Double = minDimensions.second.toDouble(), maxSize: Int = 0)
Create empty Wide boundary

Functions

area
Link copied to clipboard
fun area(): Double
Get area of of shape
clone
Link copied to clipboard
open override fun clone(): WideBoundary
Clone
component1
Link copied to clipboard
operator fun component1(): Pair<Double, Double>
component2
Link copied to clipboard
operator fun component2(): Double
component3
Link copied to clipboard
operator fun component3(): Double
component4
Link copied to clipboard
operator fun component4(): Int
coordInShape
Link copied to clipboard
fun coordInShape(x: Double, y: Double): Boolean
Check if coordinate is in shape
copy
Link copied to clipboard
fun copy(minDimensions: Pair<Double, Double> = Pair(4.0, 2.0), width: Double = minDimensions.first.toDouble(), height: Double = minDimensions.second.toDouble(), maxSize: Int = 0): WideBoundary
corners
Link copied to clipboard
fun corners(): List<Pair<Double, Double>>
List of 4 corners
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override 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
open override fun setCoords(x: Double, y: Double): WideBoundary
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 override 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
open override val dynamicHeight: Boolean = false
dynamicWidth
Link copied to clipboard
open override val dynamicWidth: Boolean = true
height
Link copied to clipboard
open override var height: Double
maxSize
Link copied to clipboard
open override var maxSize: Int = 0
minDimensions
Link copied to clipboard
open override val minDimensions: Pair<Double, Double>
strictRatio
Link copied to clipboard
open override val strictRatio: Boolean = false
width
Link copied to clipboard
open override 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