| Command | Description |
|---|
I M N | Creates a new table M × N. All the pixels are colored in white (O). |
C | Clears the table. The size remains the same. All the pixels became white (O). |
L X Y C | Colors the pixel with coordinates (X, Y) in colour C. |
V X Y1 Y2 C | Draws the vertical segment in the column X between the rows Y1 and Y2 inclusive in colour C. |
H X1 X2 Y C | Draws the horizontal segment in the row Y between the columns X1 and X2 inclusive in colour C. |
K X1 Y1 X2 Y2 C | Draws the filled rectangle in colour C. (X1, Y1) is the upper left corner, (X2, Y2) is the lower right corner of the rectangle. |
F X Y C | Fills the region with the colour C. The region R to be filled is defined as follows. The pixel (X, Y) belongs to this region. The other pixel belongs to the region R if and only if it has the same colour as pixel (X, Y) and a common side with any pixel which belongs to this region. |
S Name | Writes the picture in the file Name. |
X | Terminates the session. |
Every time the command 'S NAME' meets, you should output the file name NAME and the current table, row by row. Each row is represented by a pixels' colours series, see the output sample.
Errors: If as a command there will be a character different from I, C, L, V, H, K, F, S, X, the editor should ignore the whole line and pass to the next command.
In case of other errors the program behaviour is unpredictable.