dlg_draw_rect()

Draws a rectangle on an image component within a dialog.

Syntax

dlg_draw_rect(handle, x1, y1, x2, y2, thickness[, border, fill])

Parameters

Parameter Type Description
handle String The dialog handle.
x1 Number X-coordinate of the top-left corner.
y1 Number Y-coordinate of the top-left corner.
x2 Number X-coordinate of the bottom-right corner.
y2 Number Y-coordinate of the bottom-right corner.
thickness Number The thickness of the border.
border Number (Optional) Draw the border (true by default).
fill Number (Optional) Fill the rectangle (false by default).

Return Value

Examples

hnd = dlg_new("My dialog");
dlg_add_image(hnd);
dlg_comp_size(hnd, 500, 500);
dlg_draw_rect(hnd, 20, 20, 200, 200, 5);
dlg_draw_line(hnd, 20, 20, 200, 200, 5);
dlg_draw_arrow(hnd, 20, 480, 480, 20, 5, 30, 30);
dlg_draw_circle(hnd, 370, 370, 100, 5);
dlg_show(hnd);

See also

dlg_add_image

dlg_draw_line
dlg_draw_arrow
dlg_draw_circle
dlg_draw_rect