Appearance

Personalize your experience

Mode
Accent Color
Direction
All Docs/QuaScript//
QuaScript logo

QuaScript Documentation

Language guide, engine API, 601 builtins and the preset library · v3.0.0-phase1

draw: drawing objects

Generated from the engine catalog by tools/gen-docs.mjs; do not edit.

draw.path.create

script.qs
draw.path.create(xs, ys, color = color.blue.500, width = 1, closed = 0, fill = na, by = anchor.bar) -> id

Polyline through the points (xs[i], ys[i]).

ArgumentKindDefaultNotes
xslist<any>required
yslist<any>required
colorcolorcolor.blue.500
widthnum1
closedbool0
fillcolorna
bynumanchor.bar

draw.path.delete

script.qs
draw.path.delete(id)

Deletes the object (unknown ids are ignored with a warning).

ArgumentKindDefaultNotes
ididrequired

draw.path.update

script.qs
draw.path.update(id, xs, ys, color = na)

Replaces the points.

ArgumentKindDefaultNotes
ididrequired
xslist<any>required
yslist<any>required
colorcolorna

draw.segment.create

script.qs
draw.segment.create(x1, y1, x2, y2, color = color.blue.500, width = 1, stroke = style.solid, ray = ray.none, by = anchor.bar) -> id

Line segment from (x1, y1) to (x2, y2); x is a bar index unless by = anchor.time.

ArgumentKindDefaultNotes
x1numrequired
y1numrequired
x2numrequired
y2numrequired
colorcolorcolor.blue.500
widthnum1
strokenumstyle.solid
raynumray.none
bynumanchor.bar

draw.segment.delete

script.qs
draw.segment.delete(id)

Deletes the object (unknown ids are ignored with a warning).

ArgumentKindDefaultNotes
ididrequired

draw.segment.get

script.qs
draw.segment.get(id) -> (x1, y1, x2, y2)

End points: (x1, y1, x2, y2).

ArgumentKindDefaultNotes
ididrequired

Returns 4 values: x1, y1, x2, y2.

draw.segment.update

script.qs
draw.segment.update(id, x1 = na, y1 = na, x2 = na, y2 = na, color = na, width = na)

Changes the given fields (na keeps a field).

ArgumentKindDefaultNotes
ididrequired
x1numna
y1numna
x2numna
y2numna
colorcolorna
widthnumna

draw.segment.y_at

script.qs
draw.segment.y_at(id, x) -> num

Price of the segment's line at x.

ArgumentKindDefaultNotes
ididrequired
xnumrequired

draw.table.cell

script.qs
draw.table.cell(id, row, col, text, text_color = color.white, bg_color = na, size = 1, align = center, tooltip = )

Sets one cell.

ArgumentKindDefaultNotes
ididrequired
rowintrequired
colintrequired
texttextrequired
text_colorcolorcolor.white
bg_colorcolorna
sizenum1
aligntextcenterone of left, center, right
tooltiptext""

draw.table.clear

script.qs
draw.table.clear(id)

Removes every cell.

ArgumentKindDefaultNotes
ididrequired

draw.table.create

script.qs
draw.table.create(at = anchor.top_right, rows, cols, bg_color = color.slate.900, border_color = color.slate.700, border_width = 1) -> id

Table anchored to a screen corner (at most 100 x 20 cells).

ArgumentKindDefaultNotes
atnumanchor.top_right
rowsintrequired
colsintrequired
bg_colorcolorcolor.slate.900
border_colorcolorcolor.slate.700
border_widthnum1

draw.table.delete

script.qs
draw.table.delete(id)

Deletes the object (unknown ids are ignored with a warning).

ArgumentKindDefaultNotes
ididrequired

draw.table.from

script.qs
draw.table.from(tbl, at = anchor.top_right, header = 1, max_rows = 20, number_format = {:.2f}, header_color = color.slate.700, text_color = color.white, bg_color = color.slate.900) -> id

Shows a data table on screen (one table per call site, updated in place).

ArgumentKindDefaultNotes
tbltablerequired
atnumanchor.top_right
headerbool1
max_rowsint20
number_formattext{:.2f}
header_colorcolorcolor.slate.700
text_colorcolorcolor.white
bg_colorcolorcolor.slate.900

draw.table.merge

script.qs
draw.table.merge(id, from_row, from_col, to_row, to_col)

Merges a block of cells.

ArgumentKindDefaultNotes
ididrequired
from_rowintrequired
from_colintrequired
to_rowintrequired
to_colintrequired

draw.table.update

script.qs
draw.table.update(id, at = na, bg_color = na, border_color = na)

Changes table placement or colors.

ArgumentKindDefaultNotes
ididrequired
atnumna
bg_colorcolorna
border_colorcolorna

draw.tag.create

script.qs
draw.tag.create(x, y, text, color = color.blue.500, text_color = color.white, shape = shape.tag_down, size = 1, by = anchor.bar, tooltip = ) -> id

Text label at (x, y).

ArgumentKindDefaultNotes
xnumrequired
ynumrequired
texttextrequired
colorcolorcolor.blue.500
text_colorcolorcolor.white
shapenumshape.tag_down
sizenum1
bynumanchor.bar
tooltiptext""

draw.tag.delete

script.qs
draw.tag.delete(id)

Deletes the object (unknown ids are ignored with a warning).

ArgumentKindDefaultNotes
ididrequired

draw.tag.get

script.qs
draw.tag.get(id) -> (x, y)

Position: (x, y).

ArgumentKindDefaultNotes
ididrequired

Returns 2 values: x, y.

draw.tag.update

script.qs
draw.tag.update(id, x = na, y = na, text = , color = na)

Changes the given fields.

ArgumentKindDefaultNotes
ididrequired
xnumna
ynumna
texttext""
colorcolorna

draw.zone.create

script.qs
draw.zone.create(left, top, right, bottom, color = color.blue.500, border_color = na, border_width = 1, text = , ray = ray.none, by = anchor.bar) -> id

Rectangle between two bars and two prices.

ArgumentKindDefaultNotes
leftnumrequired
topnumrequired
rightnumrequired
bottomnumrequired
colorcolorcolor.blue.500
border_colorcolorna
border_widthnum1
texttext""
raynumray.none
bynumanchor.bar

draw.zone.delete

script.qs
draw.zone.delete(id)

Deletes the object (unknown ids are ignored with a warning).

ArgumentKindDefaultNotes
ididrequired

draw.zone.get

script.qs
draw.zone.get(id) -> (left, top, right, bottom)

Bounds: (left, top, right, bottom).

ArgumentKindDefaultNotes
ididrequired

Returns 4 values: left, top, right, bottom.

draw.zone.update

script.qs
draw.zone.update(id, left = na, top = na, right = na, bottom = na, color = na, text = )

Changes the given fields.

ArgumentKindDefaultNotes
ididrequired
leftnumna
topnumna
rightnumna
bottomnumna
colorcolorna
texttext""

© 2026 Quatick Technologies. All rights reserved.