ScaleFactor
Class
Common
value class ScaleFactor(val packedValue: Long)
Holds 2 dimensional scaling factors for horizontal and vertical axes
Properties
Common
inline val scaleX: Float
Returns the scale factor to apply along the horizontal axis
Common
inline val scaleY: Float
Returns the scale factor to apply along the vertical axis
Functions
inline operator fun component1(): Float
inline operator fun component2(): Float
fun copy(scaleX: Float = this.scaleX, scaleY: Float = this.scaleY) = ScaleFactor(scaleX, scaleY)
Returns a copy of this ScaleFactor instance optionally overriding the scaleX or scaleY parameters
operator fun times(operand: Float) = ScaleFactor(scaleX * operand, scaleY * operand)
Multiplication operator.
Returns a ScaleFactor
with scale x and y values multiplied by the operand
operator fun div(operand: Float) = ScaleFactor(scaleX / operand, scaleY / operand)
Division operator.
Returns a ScaleFactor
with scale x and y values divided by the operand
Companion Object
Properties
Common
val Unspecified = ScaleFactor(Float.NaN, Float.NaN)
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