The first byte of a drawing command means the command code. The command codes are represented by integer constants. The pen has the integer coordinate system ranging from -127 to 127 along both axes. Drawing commands have coordinates that always increased by 127.
Byte | Value |
gdbPenEnd - end of drawing | |
1 | 0 |
gdbPenDown - put the pen down | |
1 | 1 |
gdbPenUp - put the pen up | |
1 | 2 |
gdbPenMoveTo - move the pen | |
1 | 3 |
2 | x-coordinate + 127 |
3 | y-coordinate + 127 |
gdbPenColor - set a pen color | |
1 | 5 |
2 - 5 | 4 bytes for RGB representation of the color - 16r00BBGGRR |
gdbPenNibSize - set a pen width | |
1 | 6 |
2 | pen width: 1 – 255 |
gdbPenSimplexLine - simple line | |
1 | 7 |
2 - 5 | 4 bytes for RGB representation of the color - 16r00BBGGRR |
6 | pen width: 1 – 255 |
7 | pen style - PsSolid, PsDash, PsDot, PsDashdot, PsDashdotdot, PsNull, PsInsideframe. |
gdbPenStyle - set a pen style | |
1 | 9 |
2 | pen style - PsSolid, PsDash, PsDot, PsDashdot, PsDashdotdot, PsNull, PsInsideframe. |
gdbPenFillColor - set a fill color | |
1 | 10 |
2-5 | 4 bytes for RGB representation of the color - 16r00BBGGRR |
gdbPenNoFill - cancel filling | |
1 | 11 |
gdbPenCircle - draw a circle | |
1 | 12 |
2 | center x-coordinate + 127 |
3 | center y-coordinate + 127 |
4 | radius |
gdbPenPolygon - draw a polygon | |
1 | 13 |
2 | the number of vertices |
3 | x-coordinate of vertex 1 + 127 |
4 | y-coordinate of vertex 1 + 127 |
… | … |
x-coordinate of vertex n + 127 | |
y-coordinate of vertex n + 127 | |
gdbPenFont - set a font | |
1 | 14 |
2-3 | font internal number in a library: < 0 - GDB library; > 0 - the shared library. ATTENTION: Shared library styles must not contain commands of setting fonts from a GDB library. |
gdbPenText - display a text | |
1 | 15 |
2 | base point x-coordinate + 127 |
3 | base point y-coordinate + 127 |
4 | height |
5-6 | slope (in degrees * 10) |
7-8 | the number of symbols |
9 | symbol 1 |
… | … |
symbol n |