Cosmetics

This commit is contained in:
Bertrand Songis
2019-10-14 13:40:32 +02:00
parent ce3d612faf
commit bf430e8b56
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -468,7 +468,7 @@ coord_t BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_
return pos - offsetX;
}
void BitmapBuffer::drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags, uint8_t len, const char * prefix, const char * suffix)
coord_t BitmapBuffer::drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags, uint8_t len, const char * prefix, const char * suffix)
{
char str[48+1]; // max=16 for the prefix, 16 chars for the number, 16 chars for the suffix
char *s = str+32;
@@ -505,7 +505,7 @@ void BitmapBuffer::drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags,
strncpy(&str[32], suffix, 16);
}
flags &= ~LEADING0;
drawText(x, y, s, flags);
return drawText(x, y, s, flags);
}
void drawSolidRect(BitmapBuffer * dc, coord_t x, coord_t y, coord_t w, coord_t h, uint8_t thickness, LcdFlags att)
+1 -1
View File
@@ -374,7 +374,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
return drawSizedText(x, y, s+length*idx, length, flags);
}
void drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags = 0, uint8_t len = 0, const char * prefix = nullptr, const char * suffix = nullptr);
coord_t drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags = 0, uint8_t len = 0, const char * prefix = nullptr, const char * suffix = nullptr);
template<class T>
void drawBitmap(coord_t x, coord_t y, const T * bmp, coord_t srcx=0, coord_t srcy=0, coord_t w=0, coord_t h=0, float scale=0)