mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
can re-enable fill/stroke in PShapeOpenGL (fixes #3808)
This commit is contained in:
@@ -1799,8 +1799,8 @@ public class PShapeOpenGL extends PShape {
|
||||
PShapeOpenGL child = (PShapeOpenGL) children[i];
|
||||
child.setFill(fill);
|
||||
}
|
||||
} else if (this.fill && !fill) {
|
||||
setFillImpl(0x0);
|
||||
} else if (this.fill != fill) {
|
||||
markForTessellation();
|
||||
}
|
||||
this.fill = fill;
|
||||
}
|
||||
@@ -1981,16 +1981,9 @@ public class PShapeOpenGL extends PShape {
|
||||
child.setStroke(stroke);
|
||||
}
|
||||
} else if (this.stroke != stroke) {
|
||||
if (this.stroke) {
|
||||
// Disabling stroke on a shape previously with
|
||||
// stroke needs a re-tessellation in order to remove
|
||||
// the additional geometry of lines and/or points.
|
||||
markForTessellation();
|
||||
stroke = false;
|
||||
}
|
||||
setStrokeImpl(0x0);
|
||||
markForTessellation();
|
||||
if (is2D() && parent != null) {
|
||||
((PShapeOpenGL)parent).strokedTexture(false);
|
||||
((PShapeOpenGL)parent).strokedTexture(stroke && image != null);
|
||||
}
|
||||
}
|
||||
this.stroke = stroke;
|
||||
|
||||
@@ -297,6 +297,21 @@ public class PSurfaceJOGL implements PSurface {
|
||||
sketch.displayWidth = screenRect.width;
|
||||
sketch.displayHeight = screenRect.height;
|
||||
|
||||
if (sketch.displayWidth < sketch.width ||
|
||||
sketch.displayHeight < sketch.height) {
|
||||
int w = sketch.width;
|
||||
int h = sketch.height;
|
||||
if (sketch.displayWidth < w) {
|
||||
w = sketch.displayWidth;
|
||||
}
|
||||
if (sketch.displayHeight < h) {
|
||||
h = sketch.displayHeight;
|
||||
}
|
||||
// sketch.setSize(w, h - 22 - 2);
|
||||
// graphics.setSize(w, h - 22 - 22);
|
||||
System.err.println("setting width/height to " + w + " " + h);
|
||||
}
|
||||
|
||||
sketchWidth = sketch.sketchWidth();
|
||||
sketchHeight = sketch.sketchHeight();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user