getCornerPath

open fun getCornerPath(@NonNull shapePath: ShapePath, angle: Float, interpolation: Float, radius: Float)

Generates a ShapePath for this corner treatment.

CornerTreatments are assumed to have an origin of (0, 0) (i.e. they represent the top-left corner), and are automatically rotated and scaled as necessary when applied to other corners.

Parameters

shapePath

the ShapePath that this treatment should write to.

angle

the angle of the corner, typically 90 degrees.

interpolation

the interpolation of the corner treatment. Ranges between 0 (none) and 1 (fully) interpolated. Custom corner treatments can implement interpolation to support shape transition between two arbitrary states. Typically, a value of 0 indicates that the custom corner treatment is not rendered (i.e. that it is a 90 degree angle), and a value of 1 indicates that the treatment is fully rendered. Animation between these two values can "heal" or "reveal" a corner treatment.

radius

the radius or size of this corner.


open fun getCornerPath(@NonNull shapePath: ShapePath, angle: Float, interpolation: Float, @NonNull bounds: RectF, @NonNull size: CornerSize)

Generates a ShapePath for this corner treatment.

CornerTreatments are assumed to have an origin of (0, 0) (i.e. they represent the top-left corner), and are automatically rotated and scaled as necessary when applied to other corners.

Parameters

shapePath

the ShapePath that this treatment should write to.

angle

the angle of the corner, typically 90 degrees.

interpolation

the interpolation of the corner treatment. Ranges between 0 (none) and 1 (fully) interpolated. Custom corner treatments can implement interpolation to support shape transition between two arbitrary states. Typically, a value of 0 indicates that the custom corner treatment is not rendered (i.e. that it is a 90 degree angle), and a value of 1 indicates that the treatment is fully rendered. Animation between these two values can "heal" or "reveal" a corner treatment.

bounds

the bounds of the full shape that will be drawn. This could be used change the behavior of the CornerTreatment depending on how much space is available for the full shape.

size

the CornerSize used for this corner


open fun getCornerPath(angle: Float, interpolation: Float, @NonNull shapePath: ShapePath)

Deprecated

implement getCornerPath or getCornerPath instead.

Generates a ShapePath for this corner treatment.

CornerTreatments are assumed to have an origin of (0, 0) (i.e. they represent the top-left corner), and are automatically rotated and scaled as necessary when applied to other corners.

Parameters

angle

the angle of the corner, typically 90 degrees.

interpolation

the interpolation of the corner treatment. Ranges between 0 (none) and 1 (fully) interpolated. Custom corner treatments can implement interpolation to support shape transition between two arbitrary states. Typically, a value of 0 indicates that the custom corner treatment is not rendered (i.e. that it is a 90 degree angle), and a value of 1 indicates that the treatment is fully rendered. Animation between these two values can "heal" or "reveal" a corner treatment.

shapePath

the ShapePath that this treatment should write to.