SeslRoundedCorner

Utility class for managing and drawing rounded corners. 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:

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

Note: The implementation details of how the rounded corners are drawn, including the use of Bezier curves and scaling factors, are handled internally.

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, unused: Boolean)

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: Canvas)
Draws the rounded corners on the given canvas.
open fun drawRoundedCorner(@NonNull canvas: Canvas, @Nullable insets: Insets)
Draws the rounded corners on the given canvas with the specified insets.
open fun drawRoundedCorner(@NonNull rect: Rect, @NonNull canvas: Canvas)
Draws the rounded corners onto the provided canvas.
open fun drawRoundedCorner(@NonNull view: View, @NonNull canvas: Canvas)
Draws the rounded corners for the given view.
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
open fun getSmoothCornerRectPath(cornerRadius: Float, rectWidth: Float, rectHeight: Float): Path
Link copied to clipboard
open fun setRoundedCornerColor(corners: Int, @ColorInt color: Int)
Sets the color for the specified rounded corners.
Link copied to clipboard
open fun setRoundedCorners(corners: Int)
Sets the rounded corners to be drawn.