SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 31
2.3.4 Draw Round Rectangle 4Fhex - O ascii
Commands (host)
15 bytes
1.- 0x47 (hex), G (ascii). *Geometry Command.
2.- 0x4F (hex), O (ascii).
3.- X1 high byte.
4.- X1 low byte.
5.- Y1 high byte.
6.- Y1 low byte.
7.- X2 high byte.
8.- X2 low byte.
9.- Y2 high byte.
10.- Y2 low byte.
11.- Radius high byte.
12.- Radius low byte.
13.- High byte colour.
14.- Low byte colour.
15.- Fill: 0x00(hex) No Fill Geometry or
0x01(hex) Fill Geometry.
Responses (device)
1 byte
1.- 0x4F (hex), O (ascii) success ACK or
0x46 (hex), F (ascii) fail NAK.
Description
This command draws a simple round rectangle
on the screen with the two given points:
X1(16bit), Y1(16bit) and X2(16bit), Y2(16bit), with
given Radius(16bit). Colour format is the same
RGB565.
*Note that the next conditions must meet to
command success:
1.- (Radius * 2) < (y2-y1)
+
2.- (Radius * 2) < (x2-x1)
If above conditions are not meet, command will
fail with NAK ‘F’
Example (sent commands)
Example 1:
<47,52,00,46,00,32,00,C8,00,96,00,14,F8,1F,00>
Draws a no filled rounded purple rectangle from
X1:70(dec), Y1:50(dec) to X2:200(dec),
Y2:150(dec) and Radius:20(dec).