Stay organized with collections
Save and categorize content based on your preferences.
blockly > geras > Renderer
geras.Renderer class
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.
Signature:
export declare class Renderer extends BaseRenderer
Extends: BaseRenderer
Constructors
Constructor |
Modifiers |
Description |
(constructor)(name) |
|
Constructs a new instance of the Renderer class |
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 2025-05-16 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 2025-05-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egeras\u003c/code\u003e renderer in Blockly is designed for backwards compatibility with older versions of Blockly, specifically those predating 2019.\u003c/p\u003e\n"],["\u003cp\u003eFor newer projects without backwards compatibility constraints, the \u003ccode\u003ethrasos\u003c/code\u003e renderer is recommended as a more modern alternative.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egeras\u003c/code\u003e renderer extends the \u003ccode\u003eBaseRenderer\u003c/code\u003e and includes methods for initialization, creating render objects, and handling highlights, among others.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access detailed information about its constructors and methods in the provided documentation links.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [geras](./blockly.geras_namespace.md) \\\u003e [Renderer](./blockly.geras_namespace.renderer_class.md)\n\ngeras.Renderer class\n--------------------\n\nThe 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.\n\nGeras is the ancient Greek spirit of old age.\n\n**Signature:** \n\n export declare class Renderer extends BaseRenderer \n\n**Extends:** [BaseRenderer](./blockly.blockrendering_namespace.renderer_class.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|------------------------------------------------------------------------------------------------|-----------|---------------------------------------------------|\n| [(constructor)(name)](./blockly.geras_namespace.renderer_class._constructor__1_constructor.md) | | Constructs a new instance of the `Renderer` class |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [getHighlightConstants()](./blockly.geras_namespace.renderer_class.gethighlightconstants_1_method.md) | | Get the renderer's highlight constant provider. We assume that when this is called, the renderer has already been initialized. |\n| [init(theme, opt_rendererOverrides)](./blockly.geras_namespace.renderer_class.init_1_method.md) | | Initialize the renderer. Geras has a highlight provider in addition to the normal constant provider. |\n| [makeConstants_()](./blockly.geras_namespace.renderer_class.makeconstants__1_method.md) | | |\n| [makeDrawer_(block, info)](./blockly.geras_namespace.renderer_class.makedrawer__1_method.md) | `protected` | Create a new instance of the renderer's drawer. |\n| [makeHighlightConstants_()](./blockly.geras_namespace.renderer_class.makehighlightconstants__1_method.md) | `protected` | Create a new instance of the renderer's highlight constant provider. |\n| [makePathObject(root, style)](./blockly.geras_namespace.renderer_class.makepathobject_1_method.md) | | Create a new instance of a renderer path object. |\n| [makeRenderInfo_(block)](./blockly.geras_namespace.renderer_class.makerenderinfo__1_method.md) | `protected` | Create a new instance of the renderer's render info object. |\n| [refreshDom(svg, theme, injectionDiv)](./blockly.geras_namespace.renderer_class.refreshdom_1_method.md) | | |"]]