class Crop(val left: Float = 0.0f, val top: Float = 0.0f, val right: Float = 1.0f, val bottom: Float = 1.0f)
Crop
(
left
, top
, right
, bottom
)
|
Signature
constructor(left: Float = 0.0f, top: Float = 0.0f, right: Float = 1.0f, bottom: Float = 1.0f) Parameters left: Float
Left edge of the sub-rect, in 0, 1.
top: Float
Top edge of the sub-rect, in 0, 1.
right: Float
Right edge of the sub-rect, in 0, 1.
bottom: Float
Bottom edge of the sub-rect, in 0, 1.
Returns Crop |
bottom
: Float
[Get] |
Bottom edge of the sub-rect, in 0, 1.
Signature
val bottom: Float = 1.0f |
left
: Float
[Get] |
Left edge of the sub-rect, in 0, 1.
Signature
val left: Float = 0.0f |
right
: Float
[Get] |
Right edge of the sub-rect, in 0, 1.
Signature
val right: Float = 1.0f |
top
: Float
[Get] |
Top edge of the sub-rect, in 0, 1.
Signature
val top: Float = 0.0f |
NONE
: Crop
[Get] |
No crop — the full content fills the panel.
Signature
val NONE: Crop |
aspect
(
ratio
, contentAspect
)
|
A centered crop that trims the longer axis so the visible sub-rect has the given aspect Crop.Companion.aspect (width / height), for content whose own aspect is Crop.Companion.aspect (width / height, default square). Returns Crop.Companion.NONE for non-positive inputs.
Signature
fun aspect(ratio: Float, contentAspect: Float = 1.0f): Crop Parameters ratio: FloatcontentAspect: FloatReturns Crop |