Skip to content
Image & Canvas drawRect

$drawRect — Draws a rectangle (type fill or stroke) with an optional corner radius.

Draws a rectangle (type fill or stroke) with an optional corner radius.

Syntax

$drawRect[(canvas);type;(style);x;y;width;height;(radius)]

Parameters

  • canvas (String, optional) — Canvas name (empty: the current canvas)
  • type (String, required) — fill or stroke
  • style (String, optional) — Color (hex or name)
  • x (Number, required) — X
  • y (Number, required) — Y
  • width (Number, required) — Width
  • height (Number, required) — Height
  • radius (Number, optional) — Corner radius

Return Value

  • None.

Usage

$drawRect[canvas;type;style;x;y;width;height;radius] → result

Example

$sendMessage[$drawRect[canvas;type;style;x;y;width;height;radius]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.