Stay organized with collections
Save and categorize content based on your preferences.
blockly > geras
geras namespace
Classes
Class |
Description |
ConstantProvider |
An object that provides constants for rendering blocks in Geras mode. |
Drawer |
An object that draws a block based on the given rendering information, customized for the geras renderer. |
HighlightConstantProvider |
An object that provides constants for rendering highlights on blocks. Some highlights are simple offsets of the parent paths and can be generated programmatically. Others, especially on curves, are just made out of piles of constants and are hard to tweak. |
Highlighter |
An object that adds highlights to a block based on the given rendering information. Highlighting is interesting because the highlights do not fully enclose the block. Instead, they are positioned based on a light source in the top left. This means that rendering highlights requires exact information about the position of each part of the block. The resulting paths are not continuous or closed paths. The highlights for tabs and notches are loosely based on tab and notch shapes, but are not exactly the same. |
InlineInput |
An object containing information about the space an inline input takes up during rendering. |
PathObject |
An object that handles creating and setting each of the SVG elements used by the renderer. |
Renderer |
The geras renderer. This renderer was designed to be backwards compatible with pre-2019 Blockly. Newer projects that are not constrained by backwards compatibility should use thrasos, which is a more modern take on this renderer. Geras is the ancient Greek spirit of old age. |
RenderInfo |
An object containing all sizing information needed to draw this block, customized for the geras renderer. This measure pass does not propagate changes to the block (although fields may choose to rerender when getSize() is called). However, calling it repeatedly may be expensive. |
StatementInput |
An object containing information about the space a statement input takes up during rendering. |
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\u003egeras\u003c/code\u003e namespace contains classes for rendering blocks in Blockly, offering a backwards-compatible approach.\u003c/p\u003e\n"],["\u003cp\u003eIt provides tools for drawing blocks, managing highlights, and handling inputs, all tailored for the \u003ccode\u003egeras\u003c/code\u003e renderer.\u003c/p\u003e\n"],["\u003cp\u003eWhile suitable for older projects, newer projects are recommended to utilize the \u003ccode\u003ethrasos\u003c/code\u003e renderer for its modern features.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egeras\u003c/code\u003e includes classes such as \u003ccode\u003eConstantProvider\u003c/code\u003e, \u003ccode\u003eDrawer\u003c/code\u003e, \u003ccode\u003eHighlighter\u003c/code\u003e, and \u003ccode\u003eRenderer\u003c/code\u003e, among others, for comprehensive block rendering.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access detailed sizing information through the \u003ccode\u003eRenderInfo\u003c/code\u003e class, facilitating precise block layouts.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [geras](./blockly.geras_namespace.md)\n\ngeras namespace\n---------------\n\nClasses\n-------\n\n| Class | Description |\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ConstantProvider](./blockly.geras_namespace.constantprovider_class.md) | An object that provides constants for rendering blocks in Geras mode. |\n| [Drawer](./blockly.geras_namespace.drawer_class.md) | An object that draws a block based on the given rendering information, customized for the geras renderer. |\n| [HighlightConstantProvider](./blockly.geras_namespace.highlightconstantprovider_class.md) | An object that provides constants for rendering highlights on blocks. Some highlights are simple offsets of the parent paths and can be generated programmatically. Others, especially on curves, are just made out of piles of constants and are hard to tweak. |\n| [Highlighter](./blockly.geras_namespace.highlighter_class.md) | An object that adds highlights to a block based on the given rendering information. Highlighting is interesting because the highlights do not fully enclose the block. Instead, they are positioned based on a light source in the top left. This means that rendering highlights requires exact information about the position of each part of the block. The resulting paths are not continuous or closed paths. The highlights for tabs and notches are loosely based on tab and notch shapes, but are not exactly the same. |\n| [InlineInput](./blockly.geras_namespace.inlineinput_class.md) | An object containing information about the space an inline input takes up during rendering. |\n| [PathObject](./blockly.geras_namespace.pathobject_class.md) | An object that handles creating and setting each of the SVG elements used by the renderer. |\n| [Renderer](./blockly.geras_namespace.renderer_class.md) | The geras renderer. This renderer was designed to be backwards compatible with pre-2019 Blockly. Newer projects that are not constrained by backwards compatibility should use thrasos, which is a more modern take on this renderer. Geras is the ancient Greek spirit of old age. |\n| [RenderInfo](./blockly.geras_namespace.renderinfo_class.md) | An object containing all sizing information needed to draw this block, customized for the geras renderer. This measure pass does not propagate changes to the block (although fields may choose to rerender when getSize() is called). However, calling it repeatedly may be expensive. |\n| [StatementInput](./blockly.geras_namespace.statementinput_class.md) | An object containing information about the space a statement input takes up during rendering. |"]]