PiDraw API
    Preparing search index...

    Class PiDraw

    Reads the code of a drawing and builds it in a Graph, which is the one that draws, updates and exports it.

    A line of code that is not valid does not stop the others: the problems are in the report that refresh gives (and in report), line by line, for an editor to show.

    Index
    graph: PiGraph

    The graph that the code is drawn in.

    • get code(): PARSER[]

      The lines of code that were read, in the form the parser gives.

      Returns PARSER[]

    • Refresh the code to display. A line that is not valid does not stop the others, and nothing is thrown for it. The lines at the start of the code that did not change keep their figures; the others are built again.

      Parameters

      Returns IDrawReport

      what was wrong with which line, and the state of each line.

      InvalidArgumentError if options.editing is not a line number (an integer from 1).

    • Refresh the layout: the part of the coordinate system that is drawn, the size of a unit, the axes, the grid and the defaults of the figures.

      Parameters

      • Optionalcode: string

        Parameters to read (x=-10:10,axis,grid=2->red, see buildLayout). The default layout without them.

      Returns IDrawError | null

      what is wrong with the parameters, null if nothing: the layout is then left as it was, unless it is an option of the axes or of the grid that is not valid, which leaves the options before it applied.