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.