- drawMask bugfix

- WINDOWS_INSPECT_BORDER_COLOR option added
- missing names on some widgets
This commit is contained in:
Bertrand Songis
2020-04-08 11:36:48 +02:00
parent 7c0d033059
commit e5647e9ea5
4 changed files with 11 additions and 11 deletions
+1 -3
View File
@@ -283,8 +283,6 @@ class Slope {
left = false;
value = (cosf(radians) * 100 / sinf(radians));
}
// TRACE("angle=%d left=%d slope=%d", angle, left, value);
}
Slope(bool left, int value):
@@ -395,7 +393,7 @@ void BitmapBuffer::drawMask(coord_t x, coord_t y, const BitmapBuffer * mask, Lcd
if (x < xmin) {
width += x - xmin;
offset -= x + xmin;
offset -= x - xmin;
x = xmin;
}
-8
View File
@@ -452,15 +452,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
return;
}
// TRACE("x=%d xmin=%d xmax=%d w=%d", x, xmin, xmax, w);
if (scale == 0) {
/*if (x + w > width) {
w = width - x;
}
if (y + h > height) {
h = height - y;
}*/
if (bmp->getFormat() == BMP_ARGB4444) {
DMACopyAlphaBitmap(data, _width, _height, x, y, bmp->getData(), bmpw, bmph, srcx, srcy, srcw, srch);
}
+7
View File
@@ -105,6 +105,13 @@ class TransparentBitmapBackground: public TransparentBufferedWindow<Window>
{
}
#if defined(DEBUG_WINDOWS)
std::string getName() override
{
return "TransparentBitmapBackground";
}
#endif
protected:
const BitmapBuffer * background;
+3
View File
@@ -236,6 +236,9 @@ void Window::fullPaint(BitmapBuffer * dc)
if (paintNeeded) {
TRACE_WINDOWS_INDENT("%s", getWindowDebugString().c_str());
paint(dc);
#if defined(WINDOWS_INSPECT_BORDER_COLOR)
if dc->drawSolidRect(0, 0, width(), height(), 1, WINDOWS_INSPECT_BORDER_COLOR);
#endif
}
else {
TRACE_WINDOWS_INDENT("%s (skipped)", getWindowDebugString().c_str());