The draw window is a partial rectangle area on the full screen, all following drawing on screen will be remapped to this window, untill use "unset draw window" command.
The default draw window is the full screen when power on or run "unset draw window" command.
|
Direct: |
"DWWINxywh" |
|
Arduino: |
void setDrawWindow(unsigned int x, unsigned int y, unsigned int width, unsigned int height) |
|
C: |
void Digole_setDrawWindow(unsigned int x, unsigned int y, unsigned int width, unsigned int height) |
x,y
The top-left pixel position on the screen of draw window.
w(width),h(height)
The pixel's width and height of the draw window
none
mydisp.drawStr(1,1,"Hello World!"); //display "Hello World!" at position(1,1) in the full screen
mydisp.setDrawWindow(50,50,100,200); //set a draw window the top-left position at (50,50), width is 100px,height is 200px
mydisp.drawStr(1,1,"Hello World!"); //display "Hello World!" at position (1,1) in the draw window
serial.writeString("DWWIN\x32\x32\x64\xC8"); //set a draw window the top-left position at (50,50), width is 100px,height
Note: if any number of (x,y,width,height) over 254, then must use 2 bytes format
| Version | Description |
|---|---|