EllipseRect

class EllipseRect(w: Dp, h: Dp, r: FourCorners = FourCorners()) : Shape

Creates rectangle shapes with width w, height h, and optionally rounded corners with radius r.

r defaults to sharp corners resulting in normal rectangles.

The (x, y) components of r should be no larger than half the w and h values, respectively. This will result in the creation of elliptical shapes inscribed within the rectangle.

Equal w and h result in squares.

Elliptical squares result in circles.

Return

The optionally rounded rectangle.

Parameters

w

The size of the rectangle in the x axis.

h

The size of the rectangle in the y axis.

r

The definition of the radii for each corner of the rectangle.

Constructors

Link copied to clipboard
constructor(w: Dp, h: Dp, r: FourCorners = FourCorners())

Functions

Link copied to clipboard
open override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline