| DrawMultiLines | Function (ROM Call 0x196)

graph.h

void DrawMultiLines (short x, short y, const void *multi_lines);

Draws a set of lines in one turn.

DrawMultiLines draws a whole set of lines using a single command. The parameter multi_lines is a pointer to the byte-area structure organized as follows:

- The first byte is the total number of lines;
- Then, each line is described using a 5-byte structure as follows:
  - The first byte is line attribute;
  - The next four bytes are x0, y0, x1 and y1 respective.

The line will be clipped at the current clipping area boundaries given with SetCurClip command. multi_lines is usually a pointer to the MULTI_LINE structure. See DrawLine for more info about line attributes.
Parameters x and y act as a translation shifters. They are added to all line coordinates before drawing (the structure itself remains intact), so by using the same multi_line with various x-s and y-s, it is possible to draw several instances of the same-shape objects on various places on the screen.
The following example will draw two stars on the screen:

    static MULTI_LINE star_shape = {3, {{1, 30, 50, 70, 50},
                                        {1, 35, 35, 65, 65},
                                        {1, 35, 65, 65, 35}}};
    ...
    DrawMultiLines (0, 0, &star_shape);
    DrawMultiLines (80, 0, &star_shape);

Uses: LineTo, MoveTo, SetCurAttr
Used by: MenuKey, MenuOff, MenuOn, MenuTopRedef, MenuTopSelect