Draws the specified text to the given location using the current font. Color and stroke settings do not apply to fonts.
g.drawString([TEXT], [NUMBER], [NUMBER]);
Draws a line from the starting point to the ending point, using the current stroke color and thickness.
g.drawLine([NUMBER], [NUMBER], [NUMBER], [NUMBER]);
Draws a single pixel to the given location, using the current color. We recommend using the Image API if you intend to fill many pixels at a time.
g.fillPixel([NUMBER], [NUMBER]);
Draws the specified actor's image to the current pen position. Will base this upon the actor's current animation (and current frame). Still works if the actor is hidden. Useful for drawing things behind an actor.
[ACTOR].drawImage(g);
Draws the following.
Draws an outline of (or fills) a rectangle at the specified position and size, using the current stroke color and thickness (and color for filling).
g.drawRect([NUMBER], [NUMBER], [NUMBER], [NUMBER]);
g.fillRect([NUMBER], [NUMBER], [NUMBER], [NUMBER]);
Draws an outline of (or fills) a rounded rectangle at the specified position and size, using the current stroke color and thickness (and color for filling).
g.drawRoundRect([NUMBER], [NUMBER], [NUMBER], [NUMBER], [NUMBER]);
g.fillRoundRect([NUMBER], [NUMBER], [NUMBER], [NUMBER], [NUMBER]);
Draws an outline of (or fills) a circle at the specified position and size, using the current stroke color and thickness (and color for filling).
g.drawCircle([NUMBER], [NUMBER], [NUMBER]);
g.fillCircle([NUMBER], [NUMBER], [NUMBER]);
Draws an outline of (or fills) a polygon at the specified position, using the current stroke color and thickness (and color for filling). Use the add point to polygon
block to add points to the polygon.
//draw
g.beginDrawPolygon();
[ACTIONS]
g.endDrawingPolygon();
//fill
g.beginFillPolygon();
[ACTIONS]
g.endDrawingPolygon();
Adds the specified point to the polygon. Must be used within the draw a [oulined/filled] polygon
wrapper, and at least 3 points must be specified. You do not have to "close" the polygon by repeating the starting point.
g.addPointToPolygon([NUMBER], [NUMBER]);