@@ -229,21 +229,21 @@ void SLBackground::Draw(const Box& targetDimensions, Box& targetBox, bool offset
229
229
// Detect if non-wrapping layer dimensions can't cover the whole target area with its main bitmap. If so, fill in the gap with appropriate solid color sampled from the hanging edge.
230
230
if (!m_WrapX && bitmapWidth <= targetBoxWidth) {
231
231
if (m_FillColorLeft != ColorKeys::g_MaskColor && m_Offset.GetFloorIntX () != 0 ) {
232
- DrawRectangle (targetBoxCornerX, targetBoxCornerY, targetBoxWidth , targetBoxHeight, {static_cast <unsigned char >(m_FillColorLeft), 0 , 0 , 0 });
232
+ DrawRectangle (targetBoxCornerX, targetBoxCornerY, -m_Offset. m_X , targetBoxHeight, {static_cast <unsigned char >(m_FillColorLeft), 0 , 0 , 255 });
233
233
// rectfill(targetBitmap, targetBoxCornerX, targetBoxCornerY, targetBoxCornerX - m_Offset.GetFloorIntX(), targetBoxCornerY + targetBoxHeight, m_FillColorLeft);
234
234
}
235
235
if (m_FillColorRight != ColorKeys::g_MaskColor) {
236
- DrawRectangle (targetBoxCornerX, targetBoxCornerY, targetBoxWidth, targetBoxHeight, {static_cast <unsigned char >(m_FillColorRight), 0 , 0 , 0 });
236
+ DrawRectangle (targetBoxCornerX + bitmapWidth - m_Offset. m_X , targetBoxCornerY, targetBoxWidth - bitmapWidth + m_Offset. m_X , targetBoxHeight, {static_cast <unsigned char >(m_FillColorRight), 0 , 0 , 255 });
237
237
// rectfill(targetBitmap, targetBoxCornerX + bitmapWidth - m_Offset.GetFloorIntX(), targetBoxCornerY, targetBoxCornerX + targetBoxWidth, targetBoxCornerY + targetBoxHeight, m_FillColorRight);
238
238
}
239
239
}
240
240
if (!m_WrapY && bitmapHeight <= targetBoxHeight) {
241
241
if (m_FillColorUp != ColorKeys::g_MaskColor && m_Offset.GetFloorIntY () != 0 ) {
242
- DrawRectangle (targetBoxCornerX, targetBoxCornerY, targetBoxWidth, targetBoxHeight , {static_cast <unsigned char >(m_FillColorUp), 0 , 0 , 0 });
242
+ DrawRectangle (targetBoxCornerX, targetBoxCornerY, targetBoxWidth, - m_Offset. m_Y , {static_cast <unsigned char >(m_FillColorUp), 0 , 0 , 255 });
243
243
// rectfill(targetBitmap, targetBoxCornerX, targetBoxCornerY, targetBoxCornerX + targetBoxWidth, targetBoxCornerY - m_Offset.GetFloorIntY(), m_FillColorUp);
244
244
}
245
245
if (m_FillColorDown != ColorKeys::g_MaskColor) {
246
- DrawRectangle (targetBoxCornerX, targetBoxCornerY, targetBoxWidth, targetBoxHeight, {static_cast <unsigned char >(m_FillColorDown), 0 , 0 , 0 });
246
+ DrawRectangle (targetBoxCornerX, targetBoxCornerY + bitmapHeight - m_Offset. m_Y , targetBoxWidth, targetBoxHeight - bitmapHeight + m_Offset. m_Y , {static_cast <unsigned char >(m_FillColorDown), 0 , 0 , 255 });
247
247
// rectfill(targetBitmap, targetBoxCornerX, targetBoxCornerY + bitmapHeight - m_Offset.GetFloorIntY(), targetBoxCornerX + targetBoxWidth, targetBoxCornerY + targetBoxHeight, m_FillColorDown);
248
248
}
249
249
}
0 commit comments