Tool RECTANGLE

From RealWorld Wiki

Jump to: navigation, search

RECTANGLE is a drawing tool capable of drawing filled rectangles and/or rectangle outlines. The corners of the rectangles may be rounded and the rectangles can be rotated.

[edit] Scripting parameters

RECTANGLE tool can be used from scripts. The command in script may have 4 to 6 parameters:

  • radius - corner radius in pixels; use 0 to make the corners sharp.
  • centerX, centerY - center of the drawn rectangle.
  • sizeX - width of the rectangle.
  • sizeY (optional) - height of the rectangle; if this argument is missing, sizeY defaults to sizeX resulting in a square.
  • angle (optional) - clockwise rotation of the rectangle in radians (default is 0 radians).

[edit] Example

DrawTool.RECTANGLE(Document, 0, 100, 100, 50, 30);
Personal tools