blockly > blockRendering > PathObject > setPath
blockRendering.PathObject.setPath() method
Set the path generated by the renderer onto the respective SVG element.
Signature:
setPath(pathString: string): void;
Parameters
Parameter |
Type |
Description |
pathString |
string |
The path. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `setPath` method updates the SVG element of a `PathObject` with a new path defined by the provided `pathString`."],["This method is part of the `blockRendering.PathObject` class within the Blockly library and is essential for visually rendering blocks."],["It accepts a single argument, `pathString`, which is a string representing the SVG path data."],["Calling `setPath` does not return any value, it simply updates the visual representation of the `PathObject`."]]],["The `setPath()` method, part of the `blockRendering.PathObject` class, updates the SVG element with a new path. It takes a single parameter, `pathString`, which is a string defining the path to be applied. This method does not return any value. It essentially sets the visual path of the rendered element based on the input string.\n"]]