mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2025-02-21 06:57:27 -05:00
Replace fastest line routines with fillRect to save ~300 bytes
This commit is contained in:
parent
06fa0e9ad7
commit
2a8ff5e758
11
nano_gui.cpp
11
nano_gui.cpp
@ -39,15 +39,15 @@ void displayInit(void){
|
||||
}
|
||||
|
||||
void displayPixel(unsigned int x, unsigned int y, unsigned int c){
|
||||
tft.drawPixel(x,y,c);
|
||||
tft.fillRect(x,y,1,1,c);
|
||||
}
|
||||
|
||||
void displayHline(unsigned int x, unsigned int y, unsigned int w, unsigned int c){
|
||||
tft.drawFastHLine(x,y,w,c);
|
||||
tft.fillRect(x,y,w,1,c);
|
||||
}
|
||||
|
||||
void displayVline(unsigned int x, unsigned int y, unsigned int l, unsigned int c){
|
||||
tft.drawFastVLine(x,y,l,c);
|
||||
tft.fillRect(x,y,1,l,c);
|
||||
}
|
||||
|
||||
void displayClear(unsigned int color){
|
||||
@ -55,7 +55,10 @@ void displayClear(unsigned int color){
|
||||
}
|
||||
|
||||
void displayRect(unsigned int x,unsigned int y,unsigned int w,unsigned int h,unsigned int c){
|
||||
tft.drawRect(x,y,w,h,c);
|
||||
tft.fillRect(x,y,w,1,c);
|
||||
tft.fillRect(x,y,1,h,c);
|
||||
tft.fillRect(x,y+h-1,w,1,c);
|
||||
tft.fillRect(x+w-1,y,1,h,c);
|
||||
}
|
||||
|
||||
void displayFillrect(unsigned int x,unsigned int y,unsigned int w,unsigned int h,unsigned int c){
|
||||
|
Loading…
x
Reference in New Issue
Block a user