androidx.compose.ui.geometry
Classes
CornerRadius |
A radius for either circular or elliptical (oval) shapes. |
MutableRect |
An mutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin. |
Offset |
An immutable 2D floating-point offset. |
Rect |
An immutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin. |
RoundRect |
An immutable rounded rectangle with custom radii for all four corners. |
Size |
Holds a 2D floating-point size. |
Top-level functions summary
CornerRadius |
CornerRadius(x: Float, y: Float = x) Constructs a Radius with the given x and y parameters for the size of the radius along the x and y axis respectively. |
Offset |
Constructs an Offset from the given relative x and y offsets |
Rect |
Construct a rectangle from its left and top edges as well as its width and height. |
Rect |
Construct the smallest rectangle that encloses the given offsets, treating them as vectors from the origin. |
Rect |
Construct a rectangle that bounds the given circle |
RoundRect |
Construct a rounded rectangle from its left, top, right, and bottom edges, and the same radii along its horizontal axis and its vertical axis. |
RoundRect |
Construct a rounded rectangle from its left, top, right, and bottom edges, and the same radius in each corner. |
RoundRect |
Construct a rounded rectangle from its bounding box and the same radii along its horizontal axis and its vertical axis. |
RoundRect |
RoundRect(rect: Rect, cornerRadius: CornerRadius) Construct a rounded rectangle from its bounding box and a radius that is the same in each corner. |
RoundRect |
RoundRect(rect: Rect, topLeft: CornerRadius = CornerRadius.Zero, topRight: CornerRadius = CornerRadius.Zero, bottomRight: CornerRadius = CornerRadius.Zero, bottomLeft: CornerRadius = CornerRadius.Zero) Construct a rounded rectangle from its bounding box and topLeft, topRight, bottomRight, and bottomLeft radii. |
Size |
Constructs a Size from the given width and height |
CornerRadius |
lerp(start: CornerRadius, stop: CornerRadius, fraction: Float) Linearly interpolate between two radii. |
Offset |
Linearly interpolate between two offsets. |
Rect |
Linearly interpolate between two rectangles. |
RoundRect |
Linearly interpolate between two rounded rectangles. |
Size |
Linearly interpolate between two sizes |
Extension functions summary
For kotlin.Double | |
operator Size |
Returns a Size with size's Size.width and Size.height multiplied by this |
For kotlin.Float | |
operator Size |
Returns a Size with size's Size.width and Size.height multiplied by this |
For kotlin.Int | |
operator Size |
Returns a Size with size's Size.width and Size.height multiplied by this |
For Offset | |
Offset |
Offset.takeOrElse(block: () -> Offset) If this Offset then this is returned, otherwise block is executed and its result is returned. |
For Size | |
Size |
Size.takeOrElse(block: () -> Size) If this Size then this is returned, otherwise block is executed and its result is returned. |
Rect |
For MutableRect | |
Rect |
For RoundRect | |
RoundRect |
Returns a new RoundRect translated by the given offset. |
Extension properties summary
For RoundRect | |
Rect |
The bounding box of this rounded rectangle (the rectangle with no rounded corners). |
Offset |
The offset to the point halfway between the left and right and the top and bottom edges of this rectangle. |
Boolean |
Whether this rounded rectangle would draw as a circle. |
Boolean |
Whether this rounded rectangle has no side with a straight section. |
Boolean |
Whether this rounded rectangle encloses a non-zero area. |
Boolean |
Whether all coordinates of this rounded rectangle are finite. |
Boolean |
Whether this rounded rectangle is a simple rectangle with zero corner radii. |
Boolean |
Returns |
Float | |
Float |