AndroidPath
class AndroidPath : Path
kotlin.Any | |
↳ | androidx.compose.ui.graphics.AndroidPath |
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
Unit |
Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. |
Unit |
Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle radians around the oval up to startAngle + sweepAngle radians around the oval, with zero radians being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. |
Unit |
Adds a new subpath that consists of a curve that forms the ellipse that fills the given rectangle. |
Unit |
Adds a new subpath that consists of the given |
Unit |
Adds a new subpath that consists of four lines that outline the given rectangle. |
Unit |
addRoundRect(roundRect: RoundRect) Add a round rectangle shape to the path from the given RoundRect |
Unit |
If the forceMoveTo argument is false, adds a straight line segment and an arc segment. |
Unit |
close() Closes the last subpath, as if a straight line had been drawn from the current point to the first point of the subpath. |
Unit |
Adds a cubic bezier segment that curves from the current point to the given point (x3, y3), using the control points (x1, y1) and (x2, y2). |
Rect |
Compute the bounds of the control points of the path, and write the answer into bounds. |
Unit |
Adds a straight line segment from the current point to the given point |
Unit |
Starts a new subpath at the given coordinate |
Boolean |
op(path1: Path, path2: Path, operation: PathOperation) Set this path to the result of applying the Op to the two specified paths. |
Unit |
quadraticBezierTo(x1: Float, y1: Float, x2: Float, y2: Float) Adds a quadratic bezier segment that curves from the current point to the given point (x2, y2), using the control point (x1, y1). |
Unit |
Adds a cubic bezier segment that curves from the current point to the point at the offset (dx3, dy3) from the current point, using the control points at the offsets (dx1, dy1) and (dx2, dy2) from the current point. |
Unit |
relativeLineTo(dx: Float, dy: Float) Adds a straight line segment from the current point to the point at the given offset from the current point. |
Unit |
relativeMoveTo(dx: Float, dy: Float) Starts a new subpath at the given offset from the current point |
Unit |
relativeQuadraticBezierTo(dx1: Float, dy1: Float, dx2: Float, dy2: Float) Adds a quadratic bezier segment that curves from the current point to the point at the offset (dx2, dy2) from the current point, using the control point at the offset (dx1, dy1) from the current point. |
Unit |
reset() Clears the Path object of all subpaths, returning it to the same state it had when it was created. |
Unit |
Translates all the segments of every subpath by the given offset. |
Inherited functions | |
---|---|
Inherited extension functions | ||||
---|---|---|---|---|
From androidx.compose.ui.graphics
|
Properties | |
---|---|
PathFillType |
Determines how the interior of this path is calculated. |
Path | |
Boolean |
Returns the path's convexity, as defined by the content of the path. |
Boolean |
Returns true if the path is empty (contains no lines or curves) |
Public constructors
<init>
AndroidPath(internalPath: Path = android.graphics.Path())
Public methods
addArc
fun addArc(
oval: Rect,
startAngleDegrees: Float,
sweepAngleDegrees: Float
): Unit
Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval.