ShapePath

open class ShapePath

Represents the descriptive path of a shape. Path segments are stored in sequence so that transformations can be applied to them when the android.graphics.Path is produced by the MaterialShapeDrawable.

Constructors

Link copied to clipboard
constructor()
constructor(startX: Float, startY: Float)

Types

Link copied to clipboard
Path arc operation.
Link copied to clipboard
Path cubic operation.
Link copied to clipboard
Straight line operation.
Link copied to clipboard
abstract class PathOperation
Interface for a path operation to be appended to the operations list.
Link copied to clipboard
Path quad operation.

Properties

Link copied to clipboard
The angle of the start of the last drawn shadow.
Link copied to clipboard
The angle at the end of the final shadow.
Link copied to clipboard
open var endX: Float
The x coordinate for the current end of the path given the previously applied transformation.
Link copied to clipboard
open var endY: Float
The y coordinate for the current end of the path given the previously applied transformation.
Link copied to clipboard
open var startX: Float
The x coordinate for the start of the path.
Link copied to clipboard
open var startY: Float
The y coordinate for the start of the path.

Functions

Link copied to clipboard
open fun addArc(left: Float, top: Float, right: Float, bottom: Float, startAngle: Float, sweepAngle: Float)
Add an arc to the ShapePath.
Link copied to clipboard
open fun applyToPath(transform: Matrix, path: Path)
Apply the ShapePath sequence to a android.graphics.Path under a matrix transform.
Link copied to clipboard
open fun cubicToPoint(controlX1: Float, controlY1: Float, controlX2: Float, controlY2: Float, toX: Float, toY: Float)
Add a cubic to the ShapePath.
Link copied to clipboard
open fun lineTo(x: Float, y: Float)
Add a line to the ShapePath.
open fun lineTo(x1: Float, y1: Float, x2: Float, y2: Float)
Add two connected segments to the ShapePath.
Link copied to clipboard
open fun quadToPoint(controlX: Float, controlY: Float, toX: Float, toY: Float)
Add a quad to the ShapePath.
Link copied to clipboard
open fun reset(startX: Float, startY: Float)
Resets the ShapePath using a default shadow.
open fun reset(startX: Float, startY: Float, shadowStartAngle: Float, shadowSweepAngle: Float)
Resets fields given the provided assignment parameters.