SeslRoundedCorner

Utility class for managing and drawing rounded corners in SESL widgets. This class provides methods to set which corners should be rounded, the color of the rounded corners, and to draw these corners on a Canvas.

It defines constants for specifying different combinations of rounded corners:

Starting with SESL9 (One UI 8.5), corner rounding supports:

The class also includes a nested SeslRoundedChunkingDrawable class, which is a Drawable responsible for rendering a single rounded corner.

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull context: @NonNull Context)
Creates a SeslRoundedCorner instance with theme-aware rounded corner colors and radius.
constructor(@NonNull context: @NonNull Context, unused: Boolean)
Creates a SeslRoundedCorner instance with theme-aware rounded corner colors and radius.

Types

Link copied to clipboard
Represents a drawable for rendering a rounded corner "chunk" or segment.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun drawRoundedCorner(@NonNull canvas: @NonNull Canvas)
Draws the rounded corners on the given canvas.
open fun drawRoundedCorner(@NonNull canvas: @NonNull Canvas, @Nullable insets: @Nullable Insets)
Draws the rounded corners on the given canvas with the specified insets.
open fun drawRoundedCorner(@NonNull rect: @NonNull Rect, @NonNull canvas: @NonNull Canvas)
Draws the rounded corners onto the provided canvas.
open fun drawRoundedCorner(@NonNull view: @NonNull View, @NonNull canvas: @NonNull Canvas)
Draws the rounded corners for the specified view onto the given canvas.
Link copied to clipboard
Retrieves the color of a specific rounded corner.
Link copied to clipboard
Retrieves the radius of the rounded corners.
Link copied to clipboard
Returns the current rounded corner mode.
Link copied to clipboard
@NonNull
open fun getSmoothCornerRectPath(cornerRadius: Float, rectWidth: Float, rectHeight: Float): @NonNull Path
Deprecated method for generating a smooth corner rectangle path starting from (0, 0).
@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.
@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.
Link copied to clipboard
open fun setRoundedCornerColor(corners: Int, @ColorInt color: Int)
Sets the color for the specified rounded corners using a PorterDuffColorFilter.
Link copied to clipboard
open fun setRoundedCorners(corners: Int)
Sets the rounded corners to be drawn.