We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 61b9a20 + 9fa51a5 commit 9947054Copy full SHA for 9947054
1 file changed
src/gui/ImagePanel.java
@@ -563,9 +563,11 @@ private void notifyListeners() {
563
int x = (int) ((currentMousePosition.getX() - getDrawX()) * invZoom);
564
int y = (int) ((currentMousePosition.getY() - getDrawY()) * invZoom);
565
566
- if (x >= 0 && x < buffer.xResolution && y >= 0
567
- && y < buffer.yResolution && finished[y][x]) {
568
- RGBSpectrum spectrum = buffer.getPixel(x, y).getSpectrum();
+ int yy = buffer.yResolution - y - 1;
+
+ if (x >= 0 && x < buffer.xResolution && yy >= 0
569
+ && yy < buffer.yResolution && finished[yy][x]) {
570
+ RGBSpectrum spectrum = buffer.getPixel(x, yy).getSpectrum();
571
572
for (ImagePanelListener listener : listeners)
573
listener.spectrumAtMouseChanged(spectrum);
0 commit comments