Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

Commit b6e74fb

Browse files
author
mennen
committed
8209764: JavaFX/Monocle - Partial Screen Capture Broken
Reviewed-by: kcr, jvos
1 parent b31dc0f commit b6e74fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/MonocleRobot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public void getScreenCapture(int x, int y, int width, int height, int[] data, bo
214214
int colStop = Math.min(x + width, scrWidth);
215215
for (int row = y; row < rowStop; row++) {
216216
for (int col = x; col < colStop; col++) {
217-
data[row * scrWidth + col] = buffer.get(row * scrWidth + col);
217+
data[(row - y) * (colStop - x) + (col - x)] = buffer.get(row * scrWidth + col);
218218
}
219219
}
220220
}

0 commit comments

Comments
 (0)