Skip to content

guidrawingpanel: members

25 implemented, 0 reserved. Entries are sorted by name.

guidrawingpanel.availablefilters: array

Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.

The names filterRectangle accepts, as a list.

echo(Panel.availableFilters);

Specification: movieclip.md§11.5.

guidrawingpanel.clearall() -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Makes every pixel transparent.

Panel.clearAll();

Specification: gui.md§3.3.

guidrawingpanel.clearrectangle(x: number, y: number, w: number, h: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Makes the pixels of a rectangle transparent.

Panel.clearRectangle(0, 0, 10, 10);

Specification: gui.md§3.3.

guidrawingpanel.drawcurve(x1: number, y1: number, cx: number, cy: number, x2: number, y2: number, width: number, r?: number, g?: number, b?: number, a?: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws an anti-aliased curve from the first point to the second, bent towards the control point, with a line width and a color. A color left out comes from the profile of the panel.

Panel.drawCurve(0, 30, 20, 0, 40, 30, 2, 255, 0, 0, 255);

Specification: movieclip.md§11.2.

guidrawingpanel.drawimage(x: number, y: number, file: string) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws a whole picture at its own size.

Panel.drawImage(0, 0, "icon.png");

Specification: gui.md§3.3.

guidrawingpanel.drawimagerectangle(x: number, y: number, file: string, sx: number, sy: number, sw: number, sh: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws a part of a picture at its own size.

Panel.drawImageRectangle(0, 0, "icons.png", 0, 0, 16, 16);

Specification: gui.md§3.3.

guidrawingpanel.drawimagestretched(x: number, y: number, w: number, h: number, file: string, sx: number, sy: number, sw: number, sh: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws a part of a picture scaled to a size.

Panel.drawImageStretched(0, 0, 64, 64, "icon.png", 0, 0, 16, 16);

Specification: gui.md§3.3.

guidrawingpanel.drawline(x1: number, y1: number, x2: number, y2: number, width: number, r: number, g: number, b: number, a: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws an anti-aliased line of the given width and color.

Panel.drawLine(0, 0, 50, 50, 2, 255, 0, 0, 255);

Specification: gui.md§3.3.

guidrawingpanel.drawobject(x: number, y: number, object: object) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws a show image, or an NPC that shows an image, with its top-left corner at the position, at its own size and zoom. Objects of other kinds draw nothing.

Panel.drawObject(0, 0, this.icon);

Specification: movieclip.md§11.3.

guidrawingpanel.drawtext(x: number, y: number, text: string, font: string, size: number, r: number, g: number, b: number, a: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Draws text with its top-left corner at the position, in the default font.

Panel.drawText(4, 4, "Hi", "Arial", 14, 0, 0, 0, 255);

Specification: gui.md§3.3.

guidrawingpanel.enablecache: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no.

Whether the panel keeps its drawing operations, so a picture that was not here yet is drawn once it arrives. Switching it off forgets the kept operations.

Panel.enableCache = false;

Specification: movieclip.md§11.6.

guidrawingpanel.filterrectangle(x: number, y: number, w: number, h: number, filter: string) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Filters the pixels of a rectangle with one named filter: negative, gray, lesscolors, blackwhite, updown, or nightgoggle.

Panel.filterRectangle(0, 0, 64, 64, "gray");

Specification: gui.md§3.3.

guidrawingpanel.isclear: boolean

Runs on: client only. Origin: compatibility. Since: M14. Playground: no. read-only.

True while nothing was drawn since the last clearAll.

echo(Panel.isClear);

Specification: movieclip.md§11.1.

guidrawingpanel.maskimage(x: number, y: number, file: string, operation: string) -> boolean

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Combines the alpha of a picture with the pixels under it: operation add, subtract, multiply, or replace. Returns true when the picture was found and the operation is known.

Panel.maskImage(0, 0, "mask.png", "multiply");

Specification: movieclip.md§11.2.

guidrawingpanel.panel: string

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Property of GuiDrawingPanel in the legacy GUI toolkit (gui.md§2, §3).

new GuiDrawingPanel("MyControl") { panel = 1; }

Specification: gui.md§3.

guidrawingpanel.parth: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Height of the part of the panel that is drawn: the whole surface.

echo(Panel.parth);

Specification: movieclip.md§11.1.

guidrawingpanel.partw: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Width of the part of the panel that is drawn: the whole surface.

echo(Panel.partw);

Specification: movieclip.md§11.1.

guidrawingpanel.partx: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Left edge of the part of the panel that is drawn; always 0.

echo(Panel.partx);

Specification: movieclip.md§11.1.

guidrawingpanel.party: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

Top edge of the part of the panel that is drawn; always 0.

echo(Panel.party);

Specification: movieclip.md§11.1.

guidrawingpanel.saveimage(file: string) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Writes the panel as a PNG into a folder scripts may write; only on the server, client scripts cannot write files.

Panel.saveImage("logs/panel.png");

Specification: gui.md§3.3.

guidrawingpanel.saveimage2(file: string, bits?: number) -> number

Runs on: server and client. Origin: compatibility. Since: M8. Playground: no.

Writes the panel to a file in a folder scripts may write, as 24 or 32 bits per pixel; the file type follows the name (.png, .jpg, .bmp). Only on the server; client scripts cannot write files.

Panel.saveImage2("logs/panel.png", 32);

Specification: movieclip.md§11.5.

guidrawingpanel.saveimagetostring(file: string) -> string

Runs on: server and client. Origin: compatibility. Since: M14. Playground: no.

Returns the panel as the bytes of a picture file, in the type the file name ends with (.png, .jpg, .bmp).

temp.data = Panel.saveImageToString("panel.png");

Specification: movieclip.md§11.5.

guidrawingpanel.saveimagetostring2(file: string, bits?: number) -> string

Runs on: server and client. Origin: compatibility. Since: M14. Playground: no.

Like saveImageToString, with 24 or 32 bits per pixel.

temp.data = Panel.saveImageToString2("panel.png", 24);

Specification: movieclip.md§11.5.

guidrawingpanel.setdrawpalette(colors: string, transparent?: number) -> number

Runs on: server and client. Origin: compatibility. Since: M14. Playground: no.

Limits what is drawn afterwards to a list of colors: every changed pixel takes the nearest color of the list. The list is colors as three numbers, #rrggbb, or 0xrrggbb, separated by commas; the second argument is the index of the color that stays transparent. An empty list switches the limit off.

Panel.setDrawPalette("#000000, #ffffff, #ff0000", 0);

Specification: movieclip.md§11.4.

guidrawingpanel.setsize(width: number, height: number)

Runs on: server and client. Origin: compatibility. Since: M12. Playground: no.

Sets width and height of the panel in pixels; what is drawn is kept.

temp.p.setsize(64, 32);

Specification: gui.md§3.3.

Engine version 0.1.0. Built 2026-11-18.