adds scaling to VGA window; closes #800

This commit is contained in:
hneemann 2021-07-30 18:17:49 +02:00
parent 3efe8f32ee
commit ff48fa0ac8

View File

@ -54,6 +54,9 @@ public class VGADialog extends JDialog {
@Override
protected void paintComponent(Graphics g) {
if (getWidth() == image.getWidth() && getHeight() == image.getHeight()) {
g.drawImage(image, 0, 0, null);
} else {
double sx = ((double) getWidth()) / image.getWidth();
double sy = ((double) getHeight()) / image.getHeight();
@ -68,3 +71,4 @@ public class VGADialog extends JDialog {
}
}
}
}