Added bitmap tests

This commit is contained in:
Raphael Coeffic
2021-04-14 10:04:12 +02:00
parent e20203b0dc
commit 537d26351a
2 changed files with 14 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

+13
View File
@@ -213,4 +213,17 @@ TEST(Lcd_colorlcd, clipping)
EXPECT_TRUE(checkScreenshot_colorlcd(&dc, "clipping")); EXPECT_TRUE(checkScreenshot_colorlcd(&dc, "clipping"));
} }
TEST(Lcd_colorlcd, bitmap)
{
BitmapBuffer dc(BMP_RGB565, LCD_W, LCD_H);
dc.clear(DEFAULT_BGCOLOR);
dc.setClippingRect(100, 400, 50, 200);
std::unique_ptr<BitmapBuffer> bmp(BitmapBuffer::loadBitmap(TESTS_PATH "/opentx.png"));
dc.drawBitmap( 0, 0, bmp.get());
dc.drawBitmap(320, 0, bmp.get());
dc.drawBitmap( 0, 150, bmp.get());
EXPECT_TRUE(checkScreenshot_colorlcd(&dc, "bitmap"));
}
#endif #endif