Creates a Color value from red, green, blue channels. Numbers must be between [0-255] inclusive.
Utils.getColorRGB([INT], [INT], [INT])
Sets the color used for filling shapes (does not apply to fonts). You can select the color using the color picker, drag in a color attribute or drag in any block that returns a color.
g.fillColor = Utils.convertColor([COLOR]);
Sets the font used in drawing text. You can pick the font directly or drag in a font attribute block.
g.setFont([FONT]);
Sets the spacing between characters of the font.
[FONT].setLetterSpacing([NUMBER]);
Sets the opacity (alpha) used in drawing to the specified percentage. Number must be between [0-100] inclusive.
g.alpha = ([NUMBER]/100);
Sets the stroke color used when drawing shapes (does not apply to fonts). You can select the color using the color picker, drag in a color attribute or drag in any block that returns a color.
g.strokeColor = [COLOR];
Sets the stroke thickness (width) used when drawing shapes. Set to 0 to disable.
g.strokeSize = [INT];
Returns the width of the specified text using the current font. Useful for calculating text drawing positions. May only be used in a when drawing
event.
g.font.font.getTextWidth([TEXT], g.font.letterSpacing)/Engine.SCALE
Returns the width of the specified text using the given font. Useful for calculating text drawing positions.
[FONT].font.getTextWidth([TEXT], [FONT].letterSpacing)/Engine.SCALE
Returns the height of text using the current font. Useful for calculating text drawing positions. May only be used in a when drawing
event.
g.font.getHeight()/Engine.SCALE
Returns the height of text using the given font. Useful for calculating text drawing positions.
[FONT].getHeight()/Engine.SCALE