PathUtils
public
final
class
PathUtils
extends Object
| java.lang.Object | |
| ↳ | androidx.core.graphics.PathUtils |
A set of path-related utility methods.
Summary
Public methods | |
|---|---|
static
Collection<PathSegment>
|
flatten(Path path)
Flattens (or approximate) a |
static
Collection<PathSegment>
|
flatten(Path path, float error)
Flattens (or approximate) a |
Inherited methods | |
|---|---|
Public methods
flatten
public static Collection<PathSegment> flatten (Path path)
Flattens (or approximate) a Path with a series of line segments using a 0.5 pixel
error.
Note: This method requires API 26 or newer.
| Parameters | |
|---|---|
path |
Path |
| Returns | |
|---|---|
Collection<PathSegment> |
|
See also:
flatten
public static Collection<PathSegment> flatten (Path path, float error)
Flattens (or approximate) a Path with a series of line segments.
Note: This method requires API 26 or newer.
| Parameters | |
|---|---|
path |
Path |
error |
float: The acceptable error for a line on the Path. Typically this would be
0.5 so that the error is less than half a pixel.Value is 0.0 or greater. |
| Returns | |
|---|---|
Collection<PathSegment> |
|
See also: