BitmapBuffer::load renamed to BitmapBuffer::loadBitmap
This commit is contained in:
+2
-2
@@ -582,7 +582,7 @@ void drawSolidRect(BitmapBuffer * dc, coord_t x, coord_t y, coord_t w, coord_t h
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
BitmapBuffer * BitmapBuffer::load(const char * filename)
|
BitmapBuffer * BitmapBuffer::loadBitmap(const char * filename)
|
||||||
{
|
{
|
||||||
const char * ext = getFileExtension(filename);
|
const char * ext = getFileExtension(filename);
|
||||||
if (ext && !strcmp(ext, ".bmp"))
|
if (ext && !strcmp(ext, ".bmp"))
|
||||||
@@ -593,7 +593,7 @@ BitmapBuffer * BitmapBuffer::load(const char * filename)
|
|||||||
|
|
||||||
BitmapBuffer * BitmapBuffer::loadMask(const char * filename)
|
BitmapBuffer * BitmapBuffer::loadMask(const char * filename)
|
||||||
{
|
{
|
||||||
BitmapBuffer * bitmap = BitmapBuffer::load(filename);
|
BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(filename);
|
||||||
if (bitmap) {
|
if (bitmap) {
|
||||||
pixel_t * p = bitmap->getPixelPtr(0, 0);
|
pixel_t * p = bitmap->getPixelPtr(0, 0);
|
||||||
for (int i = bitmap->getWidth() * bitmap->getHeight(); i > 0; i--) {
|
for (int i = bitmap->getWidth() * bitmap->getHeight(); i > 0; i--) {
|
||||||
|
|||||||
+1
-1
@@ -351,7 +351,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
|
|||||||
|
|
||||||
void drawBitmapPatternPie(coord_t x0, coord_t y0, const uint8_t * img, LcdFlags flags, int startAngle, int endAngle);
|
void drawBitmapPatternPie(coord_t x0, coord_t y0, const uint8_t * img, LcdFlags flags, int startAngle, int endAngle);
|
||||||
|
|
||||||
static BitmapBuffer * load(const char * filename);
|
static BitmapBuffer * loadBitmap(const char * filename);
|
||||||
|
|
||||||
static BitmapBuffer * loadMask(const char * filename);
|
static BitmapBuffer * loadMask(const char * filename);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ class StaticBitmap: public Window {
|
|||||||
public:
|
public:
|
||||||
StaticBitmap(Window * parent, const rect_t & rect, const char * filename):
|
StaticBitmap(Window * parent, const rect_t & rect, const char * filename):
|
||||||
Window(parent, rect),
|
Window(parent, rect),
|
||||||
bitmap(BitmapBuffer::load(filename))
|
bitmap(BitmapBuffer::loadBitmap(filename))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user