mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
pixelDensity (OpenGL): size sketch and graphics when density changes
This commit is contained in:
@@ -816,15 +816,15 @@ public class PSurfaceJOGL implements PSurface {
|
||||
|
||||
|
||||
public void setSize(final int width, final int height) {
|
||||
if (width == sketch.width && height == sketch.height) {
|
||||
return;
|
||||
}
|
||||
if (pgl.presentMode()) return;
|
||||
|
||||
if (!pgl.presentMode()) {
|
||||
sketch.setSize(width, height);
|
||||
sketchWidth = width;
|
||||
sketchHeight = height;
|
||||
graphics.setSize(width, height);
|
||||
sketchWidth = width;
|
||||
sketchHeight = height;
|
||||
|
||||
sketch.setSize(width, height);
|
||||
graphics.setSize(width, height);
|
||||
|
||||
if (window.getWidth() != width || window.getHeight() != height) {
|
||||
window.setSize(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user