CornerBasedShape
-
Cmn
abstract class CornerBasedShape : Shape, Interpolatable
AbsoluteCutCornerShape |
A shape describing the rectangle with cut corners. |
AbsoluteRoundedCornerShape |
A shape describing the rectangle with rounded corners. |
CutCornerShape |
A shape describing the rectangle with cut corners. |
RoundedCornerShape |
A shape describing the rectangle with rounded corners. |
Base class for Shapes defined by four CornerSizes.
| See also | |
|---|---|
RoundedCornerShape |
for an example of the usage. |
Summary
Public constructors |
|
|---|---|
CornerBasedShape( |
Cmn
|
Public functions |
||
|---|---|---|
CornerBasedShape |
copy(all: CornerSize)Creates a copy of this Shape with a new corner size. |
Cmn
|
abstract CornerBasedShape |
copy(Creates a copy of this Shape with a new corner sizes. |
Cmn
|
final Outline |
createOutline( |
Cmn
|
abstract Outline |
createOutline( |
Cmn
|
open Any? |
Default implementation. |
Cmn
|
Public properties |
||
|---|---|---|
CornerSize |
a size of the bottom end corner |
Cmn
|
CornerSize |
a size of the bottom start corner |
Cmn
|
CornerSize |
a size of the top end corner |
Cmn
|
CornerSize |
a size of the top start corner |
Cmn
|
Public constructors
CornerBasedShape
CornerBasedShape(
topStart: CornerSize,
topEnd: CornerSize,
bottomEnd: CornerSize,
bottomStart: CornerSize
)
| Parameters | |
|---|---|
topStart: CornerSize |
a size of the top start corner |
topEnd: CornerSize |
a size of the top end corner |
bottomEnd: CornerSize |
a size of the bottom end corner |
bottomStart: CornerSize |
a size of the bottom start corner |
Public functions
copy
fun copy(all: CornerSize): CornerBasedShape
Creates a copy of this Shape with a new corner size.
| Parameters | |
|---|---|
all: CornerSize |
a size to apply for all four corners |
copy
abstract fun copy(
topStart: CornerSize = this.topStart,
topEnd: CornerSize = this.topEnd,
bottomEnd: CornerSize = this.bottomEnd,
bottomStart: CornerSize = this.bottomStart
): CornerBasedShape
Creates a copy of this Shape with a new corner sizes.
| Parameters | |
|---|---|
topStart: CornerSize = this.topStart |
a size of the top start corner |
topEnd: CornerSize = this.topEnd |
a size of the top end corner |
bottomEnd: CornerSize = this.bottomEnd |
a size of the bottom end corner |
bottomStart: CornerSize = this.bottomStart |
a size of the bottom start corner |
createOutline
final fun createOutline(
size: Size,
layoutDirection: LayoutDirection,
density: Density
): Outline
Creates Outline of this shape for the given size.
| Parameters | |
|---|---|
size: Size |
the size of the shape boundary. |
layoutDirection: LayoutDirection |
the current layout direction. |
density: Density |
the current density of the screen. |
createOutline
abstract fun createOutline(
size: Size,
topStart: Float,
topEnd: Float,
bottomEnd: Float,
bottomStart: Float,
layoutDirection: LayoutDirection
): Outline
Creates Outline of this shape for the given size.
| Parameters | |
|---|---|
size: Size |
the size of the shape boundary. |
topStart: Float |
the resolved size of the top start corner |
topEnd: Float |
the resolved size for the top end corner |
bottomEnd: Float |
the resolved size for the bottom end corner |
bottomStart: Float |
the resolved size for the bottom start corner |
layoutDirection: LayoutDirection |
the current layout direction. |