PathParser

Parses SVG path strings.

Types

Link copied to clipboard
open class PathDataNode
Each PathDataNode represents one command in the "d" attribute of the svg file.

Functions

Link copied to clipboard
open fun canMorph(nodesFrom: @Nullable Array<PathParser.PathDataNode>, nodesTo: @Nullable Array<PathParser.PathDataNode>): Boolean
Link copied to clipboard
open fun createNodesFromPathData(@NonNull pathData: @NonNull String): @NonNull Array<PathParser.PathDataNode>
Link copied to clipboard
@NonNull
open fun createPathFromPathData(@NonNull pathData: @NonNull String): @NonNull Path
Takes a string representation of an SVG path and converts it to a Path.
Link copied to clipboard
Link copied to clipboard
open fun interpolatePathDataNodes(target: @NonNull Array<PathParser.PathDataNode>, fraction: Float, from: @NonNull Array<PathParser.PathDataNode>, to: @NonNull Array<PathParser.PathDataNode>)
Interpolate between two arrays of PathDataNodes with the given fraction, and store the results in the first parameter.
Link copied to clipboard
open fun nodesToPath(node: @NonNull Array<PathParser.PathDataNode>, @NonNull path: @NonNull Path)
Convert an array of PathDataNode to Path.
Link copied to clipboard
open fun updateNodes(target: @NonNull Array<PathParser.PathDataNode>, source: @NonNull Array<PathParser.PathDataNode>)
Update the target's data to match the source.