- drawMask bugfix
- WINDOWS_INSPECT_BORDER_COLOR option added - missing names on some widgets
This commit is contained in:
+1
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -105,6 +105,13 @@ class TransparentBitmapBackground: public TransparentBufferedWindow<Window>
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(DEBUG_WINDOWS)
|
||||
std::string getName() override
|
||||
{
|
||||
return "TransparentBitmapBackground";
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
const BitmapBuffer * background;
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user