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

+14 -1
View File
@@ -209,8 +209,21 @@ TEST(Lcd_colorlcd, clipping)
dc.drawSolidRect(20, 20, 50, 50, 2, TITLE_BGCOLOR);
dc.drawRect( 380, 20, 50, 50, 2, SOLID, TITLE_BGCOLOR);
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