PathParser
-
Cmn
class PathParser
Summary
Public constructors |
|
|---|---|
|
Cmn
|
Public functions |
||
|---|---|---|
PathParser |
addPathNodes(nodes: List<PathNode>)Adds the list of |
Cmn
|
Unit |
clear()Clears the collection of |
Cmn
|
PathParser |
parsePathString(pathData: String)Parses the SVG path string to extract |
Cmn
|
ArrayList<PathNode> |
pathStringToNodes(pathData: String, nodes: ArrayList<PathNode>)Parses the path string and adds the corresponding |
Cmn
|
List<PathNode> |
toNodes()Returns this parser's list of |
Cmn
|
Path |
Converts this parser's list of |
Cmn
|
Public constructors
Public functions
addPathNodes
fun addPathNodes(nodes: List<PathNode>): PathParser
Adds the list of PathNode to this parser's internal list of PathNode. The resulting list can be obtained by calling toNodes.
clear
fun clear(): Unit
Clears the collection of PathNode stored in this parser and returned by toNodes.
parsePathString
fun parsePathString(pathData: String): PathParser
Parses the SVG path string to extract PathNode instances for each path instruction (lineTo, moveTo, etc.). The PathNode are stored in this parser's internal list of nodes which can be queried by calling toNodes. Calling this method replaces any existing content in the current nodes list.
pathStringToNodes
fun pathStringToNodes(
pathData: String,
nodes: ArrayList<PathNode> = ArrayList()
): ArrayList<PathNode>
Parses the path string and adds the corresponding PathNode instances to the specified nodes collection. This method returns nodes.