Jelajahi Sumber

Fixed bug in linear gradients where targetPointer did not compensate for starting on the second row.

David Piuva 2 tahun lalu
induk
melakukan
257360198b
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Source/DFPSR/machine/mediaFilters.cpp

+ 1 - 1
Source/DFPSR/machine/mediaFilters.cpp

@@ -354,8 +354,8 @@ void dsr::media_fade_region_linear(ImageU8& targetImage, const IRect& viewport,
 			}
 			}
 			// Copy the rest from the first line.
 			// Copy the rest from the first line.
 			for (int32_t y = viewport.top() + 1; y < viewport.bottom(); y++) {
 			for (int32_t y = viewport.top() + 1; y < viewport.bottom(); y++) {
-				safeMemoryCopy<uint8_t>(targetRow, sourceRow, widthInBytes);
 				targetRow.increaseBytes(targetStride);
 				targetRow.increaseBytes(targetStride);
+				safeMemoryCopy<uint8_t>(targetRow, sourceRow, widthInBytes);
 			}
 			}
 		} else {
 		} else {
 			// Each pixel needs to be evaluated in this fade.
 			// Each pixel needs to be evaluated in this fade.