mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Fix invert image draw not working correctly if the image is partially out of bounds (happens when moving a tiki torch in the editor)
This commit is contained in:
@@ -1911,8 +1911,8 @@ void ImageInvert(const PixMap *invertMask, PixMap *targetBitmap, const Rect &src
|
|||||||
const int32_t firstDestRow = destRect.top - targetBitmapRect.top + topInset;
|
const int32_t firstDestRow = destRect.top - targetBitmapRect.top + topInset;
|
||||||
const int32_t firstDestCol = destRect.left - targetBitmapRect.left + leftInset;
|
const int32_t firstDestCol = destRect.left - targetBitmapRect.left + leftInset;
|
||||||
|
|
||||||
const uint16_t numRows = destRect.Height();
|
const uint16_t numRows = constrainedDestRect.Height();
|
||||||
const uint16_t numCols = destRect.Width();
|
const uint16_t numCols = constrainedDestRect.Width();
|
||||||
|
|
||||||
const size_t invertPitch = invertMask->m_pitch;
|
const size_t invertPitch = invertMask->m_pitch;
|
||||||
const uint8_t *invertPixelDataFirstRow = static_cast<const uint8_t*>(invertMask->m_data) + firstSrcRow * invertPitch;
|
const uint8_t *invertPixelDataFirstRow = static_cast<const uint8_t*>(invertMask->m_data) + firstSrcRow * invertPitch;
|
||||||
|
Reference in New Issue
Block a user