Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > PathObject > setStyle
blockRendering.PathObject.setStyle() method
Set the style.
Signature:
setStyle(blockStyle: BlockStyle): void;
Parameters
Parameter |
Type |
Description |
blockStyle |
BlockStyle |
The block style to use. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetStyle()\u003c/code\u003e method applies a \u003ccode\u003eBlockStyle\u003c/code\u003e to a \u003ccode\u003ePathObject\u003c/code\u003e within Blockly's block rendering system.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts a single argument, \u003ccode\u003eblockStyle\u003c/code\u003e, which is an instance of the \u003ccode\u003eBlockStyle\u003c/code\u003e class, defining the visual properties to be applied.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003esetStyle()\u003c/code\u003e updates the visual appearance of the \u003ccode\u003ePathObject\u003c/code\u003e according to the provided \u003ccode\u003eblockStyle\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [PathObject](./blockly.blockrendering_namespace.pathobject_class.md) \\\u003e [setStyle](./blockly.blockrendering_namespace.pathobject_class.setstyle_1_method.md)\n\nblockRendering.PathObject.setStyle() method\n-------------------------------------------\n\nSet the style.\n\n**Signature:** \n\n setStyle(blockStyle: BlockStyle): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|------------|------------|-------------------------|\n| blockStyle | BlockStyle | The block style to use. |\n\n**Returns:**\n\nvoid"]]