beautypg.com

2 graphics commands – Matrix Orbital GLK24064-25 Legacy User Manual

Page 20

background image

4.2 Graphics Commands

In this section commands are identified by their names and decimal values.
The coordinate origin (0,0) is at the top left corner of the display. X values go from 0 to 239 (increasing

toward the right) and Y values go from 0 to 63 (increasing toward the bottom).

4.2.1 Set drawing color (254 99 [color])

This command sets the drawing color for subsequent graphic commands that do not have the drawing

color passed as a parameter. The parameter [color] is the value of the color where white 0 Hex, and black is

255 Hex.

NOTE All non-zero values will display as black.

4.2.2 Draw line (254 108 [x1][y1][x2][y2])

This command will draw a line from (x1,y1) to (x2,y2) using the current drawing color. Lines may be

drawn from any part of the display to any other part. It may be important to note that the line may interpolate

differently right to left, or left to right. This means that a line drawn in white from right to left may not fully

erase the same line drawn in black from left to right.

4.2.3 Continue line (254 101 [x][y])

This command will draw a line with the current drawing color from the last line end (x2,y2) to (x,y).

This command uses the global drawing color so the “Set drawing color” command should be used before

the first line segment if required.

4.2.4 Put pixel (254 112 [x][y])

This command will draw a pixel at (x,y) using the current drawing color. The unit processes these

requests fast enough to keep up with a steady stream at 115 kbaud, so flow control is not required.

4.2.5 Draw outline rectangle (254 114 [color][x1][y1][x2][y2])

This command draws a rectangular box in the specified color (0 = white, non-zero = black). The top left

corner is specified by (x1,y1) and the bottom right corner by (x2,y2).

Matrix Orbital

GLK24064-25

16