getSmoothCornerRectPath

@NonNull
open fun getSmoothCornerRectPath(cornerRadius: Float, left: Float, top: Float, width: Float, height: Float): @NonNull Path

Builds a smooth-rounded rectangle path where all corners are rounded according to the specified radius.

Return

A Path representing the smooth-rounded rectangle.

Parameters

cornerRadius

The desired smooth corner radius in pixels.

left

The left coordinate of the rectangle.

top

The top coordinate of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle.


@NonNull
open fun getSmoothCornerRectPath(cornerRadius: Float, left: Float, top: Float, width: Float, height: Float, corners: Int): @NonNull Path

Builds a smooth-rounded rectangle path where only the corners selected by the corners bitmask are rounded; unselected corners remain sharp.

Return

A Path representing the selectively smooth-rounded rectangle.

Parameters

cornerRadius

The desired smooth corner radius in pixels.

left

The left coordinate of the rectangle.

top

The top coordinate of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle.


@NonNull
open fun getSmoothCornerRectPath(cornerRadius: Float, rectWidth: Float, rectHeight: Float): @NonNull Path

Deprecated

Use getSmoothCornerRectPath instead.

Deprecated method for generating a smooth corner rectangle path starting from (0, 0).

Return

A Path representing the smooth-rounded rectangle.

Parameters

cornerRadius

The desired smooth corner radius.

rectWidth

The width of the rectangle.

rectHeight

The height of the rectangle.