Skip to content
Image & Canvas setPixels

$setPixels — Places pixels (JSON array, Rgba or Hex) in an area of the canvas without blending. (alias of $putPixels)

Places pixels (JSON array, Rgba or Hex) in an area of the canvas without blending. (alias of $putPixels)

Syntax

$setPixels[(canvas);pixels;x;y;width;height;(type)]

Parameters

  • canvas (String, optional) — Canvas name (empty: the current canvas)
  • pixels (Json, required) — Pixels
  • x (Number, required) — Area X
  • y (Number, required) — Area Y
  • width (Number, required) — Area width
  • height (Number, required) — Area height
  • type (String, optional) — Rgba or Hex

Return Value

  • None.

Usage

$setPixels[canvas;pixels;x;y;width;height;type] → result

Example

$sendMessage[$setPixels[canvas;pixels;x;y;width;height;type]]

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.