/** * Drawing objects into the chart's free drawings. * * A plot is a column of one value per bar and its set is fixed before bar 0. A * drawing object is neither: a script creates one on the bar it decides to, and * moves, recolours and deletes it on any bar afterwards (`stdlib.md` 14.4). The * chart's own field for that is a list of shapes anchored to time and price, * replaced wholesale on every recompute, and that replacement is what makes the * two halves fit without a protocol between them: * * - A script that deletes an object simply stops handing it over, and it is gone. * - A moving bar rolls its objects back before re-executing, so the list handed * over after four ticks of one bar is the list after one, and a line drawn per * tick does not accumulate four times. * * **An anchor is a time and a price, and neither is resolved against a bar.** An * anchor ten days past the newest bar crosses as the number it was written as and * lands in the margin, which is what a projection is for. * * **Absence is a gap, and it takes two shapes here.** An anchor with no time or * no price cannot be placed at all, so a line, a box or a label missing either is * not drawn: `language.md` 6.7 says nothing is drawn there and nothing is * invented to fill it, and a zero would be a price. A colour that is absent * becomes fully transparent rather than being left out, because the chart draws a * shape's border in its own ink where no colour is given, and `none` in this * language means nothing is drawn rather than "you choose". * * **A path with a gap in it becomes several paths.** The chart's polyline is one * run of points and the language's path may have a hole in it, so the path is cut * at the hole and each run is drawn. A run of one point is dropped, since a path * needs two, and the `closed` and `fillColor` of a path that was cut are left * off: closing each run separately would draw shapes the script never described. */ import type { Drawing } from '../../core/engine/index.js'; import type { ChartDrawing } from './surfaces.js'; /** * Every object the script holds, in the order it created them. * * Creation order rather than any other, because it is the order the script wrote * and therefore the order a reader expects one shape to sit over another. */ export declare function buildDrawings(held: readonly Drawing[]): readonly ChartDrawing[]; //# sourceMappingURL=drawings.d.ts.map