Stay organized with collections
Save and categorize content based on your preferences.
blockly > geras > Drawer
geras.Drawer class
An object that draws a block based on the given rendering information, customized for the geras renderer.
Signature:
export declare class Drawer extends BaseDrawer
Extends: BaseDrawer
Constructors
Properties
Methods
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."],[[["The `geras.Drawer` class is responsible for drawing blocks within the Blockly workspace, specifically tailored for the Geras renderer."],["It extends the `BaseDrawer` class and provides methods for drawing various block elements, such as inputs, connections, and edges."],["It utilizes a `ConstantProvider` for consistent styling and a `Highlighter` for visual feedback."],["Key functionalities include methods like `draw()`, `drawInlineInput_()`, `drawJaggedEdge_()`, and methods for positioning connections."]]],["The `Drawer` class, part of the `geras` renderer, is designed to draw blocks based on provided rendering information. It extends the `BaseDrawer` and includes a constructor to create instances. Key actions include drawing the block using the `draw()` method, and drawing specific block elements such as the top, bottom, left side, jagged edge, inline, statement, and value inputs via methods like `drawTop_()`, `drawBottom_()`, `drawInlineInput_()`, `drawStatementInput_()`, etc. It also positions connections with similar `position` methods. It holds properties for `constants_` and a `highlighter_`.\n"]]