Pfadobjekt
PathObject
enthält die SVG-Elemente im DOM, aus denen der Block besteht.
Im Renderer Geras haben Blöcke beispielsweise einen „Hauptpfad“, einen „dunklen“ Pfad und einen „hellen“ Pfad, damit sie einen 3D-Effekt erzielen. Das Pfadobjekt erstellt die SVG-Elemente für jeden dieser Pfade.

Dies steht im Gegensatz zum Renderer Thrasos, dessen Blöcke ein einzelnes Pfadelement mit einem Strich haben:

Außerdem wird Folgendes verarbeitet:
- Die von der Leiste generierte Form wird auf die SVG-Elemente angewendet.
- Designfarben werden auf die SVG-Elemente angewendet.
- Andere Stile werden auf die SVG-Elemente angewendet.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2023-07-24 (UTC).
[null,null,["Zuletzt aktualisiert: 2023-07-24 (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"]]