Class: HighlightConstantProvider
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:61
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.
Properties index
| Property | Description |
|---|---|
| constantProvider | - |
| OFFSET | The offset between the block's main path and highlight path. |
| START_POINT | - |
| INSIDE_CORNER | - |
| OUTSIDE_CORNER | - |
| PUZZLE_TAB | - |
| NOTCH | - |
| JAGGED_TEETH | - |
| START_HAT | - |
Methods index
| Method | Description |
|---|---|
| init | Initialize shape objects based on the constants set in the constructor. |
| makeInsideCorner | Returns an object containing sizing and path information about inside corner highlights. |
| makeOutsideCorner | Returns an object containing sizing and path information about outside corner highlights. |
| makePuzzleTab | Returns an object containing sizing and path information about puzzle tab highlights. |
| makeNotch | Returns an object containing sizing and path information about notch highlights. |
| makeJaggedTeeth | Returns an object containing sizing and path information about collapsed block edge highlights. |
| makeStartHat | Returns an object containing sizing and path information about start highlights. |
Constructors
Constructor
new HighlightConstantProvider(constants): HighlightConstantProvider;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:83
Parameters
| Parameter | Type | Description |
|---|---|---|
constants | ConstantProvider | The rendering constants provider. |
Returns
HighlightConstantProvider
Properties
constantProvider
constantProvider: ConstantProvider;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:62
OFFSET
OFFSET: number = 0.5;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:65
The offset between the block's main path and highlight path.
START_POINT
START_POINT: string;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:66
INSIDE_CORNER
INSIDE_CORNER: InsideCorner;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:68
OUTSIDE_CORNER
OUTSIDE_CORNER: OutsideCorner;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:70
PUZZLE_TAB
PUZZLE_TAB: PuzzleTab;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:72
NOTCH
NOTCH: Notch;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:74
JAGGED_TEETH
JAGGED_TEETH: JaggedTeeth;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:76
START_HAT
START_HAT: StartHat;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:78
Methods
init()
init(): void;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:96
Initialize shape objects based on the constants set in the constructor.
Returns
void
makeInsideCorner()
protected makeInsideCorner(): InsideCorner;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:137
Returns
InsideCorner
An object containing sizing and path information about inside corner highlights.
makeOutsideCorner()
protected makeOutsideCorner(): OutsideCorner;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:188
Returns
OutsideCorner
An object containing sizing and path information about outside corner highlights.
makePuzzleTab()
protected makePuzzleTab(): PuzzleTab;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:246
Returns
PuzzleTab
An object containing sizing and path information about puzzle tab highlights.
makeNotch()
protected makeNotch(): Notch;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:296
Returns
Notch
An object containing sizing and path information about notch highlights.
makeJaggedTeeth()
protected makeJaggedTeeth(): JaggedTeeth;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:308
Returns
JaggedTeeth
An object containing sizing and path information about collapsed block edge highlights.
makeStartHat()
protected makeStartHat(): StartHat;
Defined in: packages/blockly/core/renderers/geras/highlight_constants.ts:320
Returns
StartHat
An object containing sizing and path information about start highlights.