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:
- ROUNDED_CORNER_NONE: No corners are rounded.
- ROUNDED_CORNER_TOP_LEFT: Only the top-left corner is rounded.
- ROUNDED_CORNER_TOP_RIGHT: Only the top-right corner is rounded.
- ROUNDED_CORNER_BOTTOM_LEFT: Only the bottom-left corner is rounded.
- ROUNDED_CORNER_BOTTOM_RIGHT: Only the bottom-right corner is rounded.
- ROUNDED_CORNER_ALL: All four corners are rounded.
Starting with SESL9 (One UI 8.5), corner rounding supports:
- Selective corner path generation via getSmoothCornerRectPath, allowing specific corners to remain sharp while others are smooth-rounded.
- Color filtering via PorterDuffColorFilter applied directly to the individual corner drawables (mTopLeftRound, mTopRightRound, mBottomLeftRound, mBottomRightRound).
- Path node caching in SeslRoundedChunkingDrawable to eliminate string parsing overhead on repeated draw operations.
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
Creates a SeslRoundedCorner instance with theme-aware rounded corner colors and radius.
Creates a SeslRoundedCorner instance with theme-aware rounded corner colors and radius.
Types
Properties
Functions
Link copied to clipboard
Draws the rounded corners on the given canvas.
Draws the rounded corners on the given canvas with the specified insets.
Draws the rounded corners onto the provided 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
Deprecated method for generating a smooth corner rectangle path starting from (0, 0).
@NonNull
Builds a smooth-rounded rectangle path where all corners are rounded according to the specified radius.
@NonNull
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
Sets the color for the specified rounded corners using a PorterDuffColorFilter.
Link copied to clipboard
Sets the rounded corners to be drawn.