CornerBasedShape

表示一个基于四个可自定义边角的形状的基类。

这是创建如圆角矩形 (RoundedCornerShape) 或切角矩形 (CutCornerShape) 等形状的基础。 您可以分别设置每个角的大小,或者一次性设置所有角。 此外,您还可以定义角的“类型”,例如是圆角还是切角,以及它们是否应自适应从右到左 (RTL) 的布局。

Author

M8Test, [email protected], https://m8test.com

See also

Functions

Link copied to clipboard
abstract fun setAll(all: (CornerSizes) -> CornerSize)

将所有四个角的尺寸设置为相同的值。

Link copied to clipboard
abstract fun setBottomEnd(bottomEnd: (CornerSizes) -> CornerSize)

设置末尾底角 (bottomEnd) 的尺寸。

Link copied to clipboard
abstract fun setBottomStart(bottomStart: (CornerSizes) -> CornerSize)

设置起始底角 (bottomStart) 的尺寸。

Link copied to clipboard
abstract fun setTopEnd(topEnd: (CornerSizes) -> CornerSize)

设置末尾顶角 (topEnd) 的尺寸。

Link copied to clipboard
abstract fun setTopStart(topStart: (CornerSizes) -> CornerSize)

设置起始顶角 (topStart) 的尺寸。

Link copied to clipboard
abstract fun setType(type: (CornerTypes) -> CornerType)

设置边角的类型,这决定了形状是圆角还是切角,以及是否自适应布局方向。