ScaleFactor
-
Cmn
value class ScaleFactor
Holds 2 dimensional scaling factors for horizontal and vertical axes
Summary
Public companion properties |
||
|---|---|---|
ScaleFactor |
A ScaleFactor whose |
Cmn
|
Public constructors |
|
|---|---|
ScaleFactor(packedValue: Long) |
Cmn
|
Public functions |
||
|---|---|---|
inline operator Float |
Cmn
|
|
inline operator Float |
Cmn
|
|
ScaleFactor |
Returns a copy of this ScaleFactor instance optionally overriding the scaleX or scaleY parameters |
Cmn
|
operator ScaleFactor |
Division operator. |
Cmn
|
operator ScaleFactor |
Multiplication operator. |
Cmn
|
open String |
toString() |
Cmn
|
Public properties |
||
|---|---|---|
Long |
Cmn
|
|
Float |
Returns the scale factor to apply along the horizontal axis |
Cmn
|
Float |
Returns the scale factor to apply along the vertical axis |
Cmn
|
Extension functions |
||
|---|---|---|
inline ScaleFactor |
ScaleFactor.takeOrElse(block: () -> ScaleFactor)If this |
Cmn
|
operator Size |
ScaleFactor.times(size: Size)Multiplication operator with |
Cmn
|
Extension properties |
||
|---|---|---|
Boolean |
|
Cmn
|
Boolean |
|
Cmn
|
Public companion properties
Unspecified
val Unspecified: ScaleFactor
A ScaleFactor whose scaleX and scaleY parameters are unspecified. This is a sentinel value used to initialize a non-null parameter. Access to scaleX or scaleY on an unspecified size is not allowed
Public constructors
Public functions
copy
fun copy(scaleX: Float = this.scaleX, scaleY: Float = this.scaleY): ScaleFactor
Returns a copy of this ScaleFactor instance optionally overriding the scaleX or scaleY parameters
div
operator fun div(operand: Float): ScaleFactor
Division operator.
Returns a ScaleFactor with scale x and y values divided by the operand
times
operator fun times(operand: Float): ScaleFactor
Multiplication operator.
Returns a ScaleFactor with scale x and y values multiplied by the operand
Extension functions
takeOrElse
inline fun ScaleFactor.takeOrElse(block: () -> ScaleFactor): ScaleFactor
If this ScaleFactor then this is returned, otherwise block is executed and its result is returned.
times
operator fun ScaleFactor.times(size: Size): Size
Multiplication operator with Size with reverse parameter types to maintain commutative properties of multiplication
Return a new Size with the width and height multiplied by the ScaleFactor.scaleX and ScaleFactor.scaleY respectively