beautypg.com

2 graphics commands – Matrix Orbital GLK12232-25-SM Legacy User Manual

Page 18

background image

Each pixel in a bitmap is described by a single bit, and may only have the values ON or OFF. For

example, shades of grey are not supported.

5.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).

5.2.1 Set Drawing Colour (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.

5.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, but 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.

5.2.3 Continue Line (254 101 [x][y])

This command will draw 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.

5.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.

5.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

GLK12232-25-SM

14