DefaultSize

data class DefaultSize(width: Int, height: Int) : BaseSize

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: Size): Int
component1
Link copied to clipboard
common
operator override fun component1(): Int
component2
Link copied to clipboard
common
operator override fun component2(): Int
containsPosition
Link copied to clipboard
common
open override fun containsPosition(position: Position): Boolean
Tells whether this Size contains the given Position.
copy
Link copied to clipboard
common
fun copy(width: Int, height: Int): DefaultSize
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
fetchBottomLeftPosition
Link copied to clipboard
common
open override fun fetchBottomLeftPosition(): Position
fetchBottomRightPosition
Link copied to clipboard
common
open override fun fetchBottomRightPosition(): Position
fetchBoundingBoxPositions
Link copied to clipboard
common
open override fun fetchBoundingBoxPositions(): Set<Position>
Creates a list of Positions which represent the bounding box of this size.
fetchPositions
Link copied to clipboard
common
open override fun fetchPositions(): Iterable<Position>
Creates a list of Positions in the order in which they should be iterated when drawing (first rows, then columns in those rows).
fetchTopLeftPosition
Link copied to clipboard
common
open override fun fetchTopLeftPosition(): Position
fetchTopRightPosition
Link copied to clipboard
common
open override fun fetchTopRightPosition(): Position
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
max
Link copied to clipboard
common
open override fun max(other: Size): Size
Takes a different Size and returns a new Size that has the largest dimensions of the two, measured separately.
min
Link copied to clipboard
common
open override fun min(other: Size): Size
Takes a different Size and returns a new Size that has the smallest dimensions of the two, measured separately.
minus
Link copied to clipboard
common
open operator override fun minus(other: Size): Size
plus
Link copied to clipboard
common
open operator override fun plus(other: Size): Size
to3DSize
Link copied to clipboard
common
open fun to3DSize(zLength: Int = 0): Size3D
Creates a new Size3D from this Size and the given zLength.
toPosition
Link copied to clipboard
common
open override fun toPosition(): Position
toRect
Link copied to clipboard
common
open override fun toRect(): Rect
Converts this Size to a Rect using Position.zero.
open override fun toRect(position: Position): Rect
Converts this Size to a Rect with the given Position.
toSize3D
Link copied to clipboard
common
open fun toSize3D(zLength: Int = 0): Size3D
Creates a new Size3D from this Size and the given zLength.
toString
Link copied to clipboard
common
open override fun toString(): String
with
Link copied to clipboard
common
open override fun with(size: Size): Size
Returns itself if it is equal to the supplied size, otherwise the supplied size.
withHeight
Link copied to clipboard
common
open override fun withHeight(height: Int): Size
Creates a new size based on this size, but with a different height.
withRelative
Link copied to clipboard
common
open override fun withRelative(delta: Size): Size
Creates a new Size object representing a size based on this object's size but with a delta applied.
withRelativeHeight
Link copied to clipboard
common
open override fun withRelativeHeight(delta: Int): Size
Creates a new Size object representing a size with the same number of width, but with a height size offset by a supplied value.
withRelativeWidth
Link copied to clipboard
common
open override fun withRelativeWidth(delta: Int): Size
Creates a new Size object representing a size with the same number of height, but with a width size offset by a supplied value.
withWidth
Link copied to clipboard
common
open override fun withWidth(width: Int): Size
Creates a new size based on this size, but with a different width.

Properties

height
Link copied to clipboard
common
open override val height: Int
isNotUnknown
Link copied to clipboard
common
open override val isNotUnknown: Boolean
Tells whether this Sizeis not the same as Size.unknown.
isUnknown
Link copied to clipboard
common
open override val isUnknown: Boolean
Tells whether this Sizeis the same as Size.unknown.
width
Link copied to clipboard
common
open override val width: Int

Sources

(source)
Link copied to clipboard