Path object
The PathObject
contains the SVG elements in the DOM
that make up the block.
For example, in the Geras renderer, blocks have a "main"
path, a "dark" path and a "light" path, to give them a 3d effect. The
path object creates the SVG elements for each of these paths.

This is opposed to the Thrasos renderer, whose blocks
have a single path element with a stroke:

It also handles:
- Applying the shape generated by the drawer to the SVG elements.
- Applying theme colors to the SVG elements.
- Applying other styling to the SVG elements.
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 `PathObject` manages the SVG elements that visually represent a block in Blockly, such as the main, dark, and light paths for 3D effects."],["It applies the shape created by the drawer, along with theme colors and other styling, to these SVG elements."],["Different renderers, like Geras and Thrasos, utilize `PathObject` to create unique visual styles for their blocks."]]],["The `PathObject` class manages the SVG elements that form a block's visual representation within the DOM. It generates SVG elements for different paths (e.g., main, dark, light) as seen in the Geras renderer or a single path as in the Thrasos renderer. It also applies the shape from the drawer, incorporates theme colors, and applies other styling to these SVG elements. It handles all these visual modifications of the block.\n"]]