ImmutableBox
-
android
class ImmutableBox : Box
An immutable axis-aligned rectangle. See MutableBox for a mutable version.
Note that unlike android.graphics.RectF, this does not express an opinion about axis direction (e.g. the positive Y axis being "down"), because it is intended to be used with any coordinate system rather than just Android screen / View space.
Summary
Nested types |
|---|
object ImmutableBox.Companion |
Public companion functions |
||
|---|---|---|
ImmutableBox |
fromCenterAndDimensions(Constructs an |
android
|
ImmutableBox |
fromTwoPoints(point1: Vec, point2: Vec)Constructs the smallest |
android
|
Public functions |
||
|---|---|---|
open operator Boolean |
android
|
|
open Int |
hashCode() |
android
|
open String |
toString() |
android
|
Public properties |
||
|---|---|---|
open Float |
The upper bound in the |
android
|
open Float |
The lower bound in the |
android
|
open Float |
The upper bound in the |
android
|
open Float |
The lower bound in the |
android
|
Inherited functions |
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
|---|
Public companion functions
fromCenterAndDimensions
fun fromCenterAndDimensions(
center: Vec,
width: @FloatRange(from = 0.0) Float,
height: @FloatRange(from = 0.0) Float
): ImmutableBox
Constructs an ImmutableBox with a given center, width, and height.
fromTwoPoints
fun fromTwoPoints(point1: Vec, point2: Vec): ImmutableBox
Constructs the smallest ImmutableBox containing the two given points.