Browse Source

🩹 Fix and clean up E3V2 draw (#24013)

InsanityAutomation 2 years ago
parent
commit
02f5e2de9c
No account linked to committer's email address

+ 0
- 4
Marlin/src/lcd/e3v2/common/dwin_api.cpp View File

235
 //  rlimit: To limit the drawn string length
235
 //  rlimit: To limit the drawn string length
236
 void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) {
236
 void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) {
237
   DWIN_Draw_Rectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size));
237
   DWIN_Draw_Rectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size));
238
-  DWIN_UpdateLCD();
239
   constexpr uint8_t widthAdjust = 0;
238
   constexpr uint8_t widthAdjust = 0;
240
   size_t i = 0;
239
   size_t i = 0;
241
   DWIN_Byte(i, 0x11);
240
   DWIN_Byte(i, 0x11);
250
   DWIN_Word(i, y);
249
   DWIN_Word(i, y);
251
   DWIN_Text(i, string, rlimit);
250
   DWIN_Text(i, string, rlimit);
252
   DWIN_Send(i);
251
   DWIN_Send(i);
253
-  DWIN_UpdateLCD();
254
 }
252
 }
255
 
253
 
256
 // Draw a positive integer
254
 // Draw a positive integer
297
   #endif
295
   #endif
298
 
296
 
299
   DWIN_Send(i);
297
   DWIN_Send(i);
300
-  DWIN_UpdateLCD();
301
 }
298
 }
302
 
299
 
303
 // Draw a floating point number
300
 // Draw a floating point number
332
   DWIN_Byte(i, fvalue[0]);
329
   DWIN_Byte(i, fvalue[0]);
333
   */
330
   */
334
   DWIN_Send(i);
331
   DWIN_Send(i);
335
-  DWIN_UpdateLCD();
336
 }
332
 }
337
 
333
 
338
 // Draw a floating point number
334
 // Draw a floating point number

+ 0
- 1
Marlin/src/lcd/e3v2/marlinui/ui_common.cpp View File

181
   dwin_font.solid = true;
181
   dwin_font.solid = true;
182
   dwin_font.fg = Color_White;
182
   dwin_font.fg = Color_White;
183
   dwin_font.bg = Color_Bg_Black;
183
   dwin_font.bg = Color_Bg_Black;
184
-  DWIN_Draw_Box(1, Color_Bg_Black, 0, (LCD_PIXEL_HEIGHT - (STAT_FONT_HEIGHT) - 1), 272, STAT_FONT_HEIGHT + 1);
185
   lcd_moveto_xy(0, LCD_PIXEL_HEIGHT - (STAT_FONT_HEIGHT) - 1);
184
   lcd_moveto_xy(0, LCD_PIXEL_HEIGHT - (STAT_FONT_HEIGHT) - 1);
186
 
185
 
187
   constexpr uint8_t max_status_chars = (LCD_PIXEL_WIDTH) / (STAT_FONT_WIDTH);
186
   constexpr uint8_t max_status_chars = (LCD_PIXEL_WIDTH) / (STAT_FONT_WIDTH);

Loading…
Cancel
Save