mirror of
https://github.com/processing/processing4.git
synced 2026-05-31 12:37:14 +02:00
add fullScreen() with no args, don't take advantage of package protected in Java2D
This commit is contained in:
@@ -809,7 +809,7 @@ public class PApplet implements PConstants {
|
||||
|
||||
String renderer = JAVA2D;
|
||||
// int quality = 2;
|
||||
int smooth = 1;
|
||||
int smooth = 1; // default smoothing (whatever that means for the renderer)
|
||||
|
||||
boolean fullScreen;
|
||||
int display = -1; // use default
|
||||
@@ -872,6 +872,7 @@ public class PApplet implements PConstants {
|
||||
insideSettings = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from settings.xml )
|
||||
*
|
||||
@@ -887,7 +888,6 @@ public class PApplet implements PConstants {
|
||||
* @see PApplet#size()
|
||||
* @see PApplet#smooth()
|
||||
*/
|
||||
|
||||
public void settings() {
|
||||
// is this necessary? (doesn't appear to be, so removing)
|
||||
//size(DEFAULT_WIDTH, DEFAULT_HEIGHT, JAVA2D);
|
||||
@@ -1567,6 +1567,15 @@ public class PApplet implements PConstants {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Create a full-screen sketch using the default renderer.
|
||||
*/
|
||||
public void fullScreen() {
|
||||
fullScreen(sketchRenderer());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from fullScreen.xml )
|
||||
*
|
||||
@@ -1580,7 +1589,6 @@ public class PApplet implements PConstants {
|
||||
* @see PApplet#size()
|
||||
* @see PApplet#smooth()
|
||||
*/
|
||||
|
||||
public void fullScreen(String renderer) {
|
||||
if (insideSettings("fullScreen", renderer)) {
|
||||
fullScreen = true;
|
||||
@@ -1588,10 +1596,10 @@ public class PApplet implements PConstants {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param display the screen to run the sketch on (1, 2, 3, etc.)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param display the screen to run the sketch on (1, 2, 3, etc.)
|
||||
*/
|
||||
public void fullScreen(String renderer, int display) {
|
||||
if (insideSettings("fullScreen", renderer, display)) {
|
||||
fullScreen = true;
|
||||
|
||||
@@ -3559,11 +3559,13 @@ public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
// SMOOTHING
|
||||
|
||||
final public void smooth() { // ignore
|
||||
|
||||
public void smooth() { // ignore
|
||||
smooth(1);
|
||||
}
|
||||
|
||||
final public void smooth(int quality) { // ignore
|
||||
|
||||
public void smooth(int quality) { // ignore
|
||||
if (primaryGraphics) {
|
||||
parent.smooth(quality);
|
||||
} else {
|
||||
@@ -3579,7 +3581,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
}
|
||||
}
|
||||
|
||||
final public void noSmooth() { // ignore
|
||||
|
||||
public void noSmooth() { // ignore
|
||||
smooth(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ public class PSurfaceAWT extends PSurfaceNone {
|
||||
if (screenRect.width == sketchWidth &&
|
||||
screenRect.height == sketchHeight) {
|
||||
fullScreen = true;
|
||||
sketch.fullScreen = true; // hmm
|
||||
sketch.fullScreen(); // won't change the renderer
|
||||
}
|
||||
|
||||
if (fullScreen || spanDisplays) {
|
||||
|
||||
+4
-2
@@ -61,12 +61,14 @@ X split 'present' and 'full screen'?
|
||||
X --full-screen causes considerable flicker at this point
|
||||
X or split them when sketchWidth/Height are implemented?
|
||||
_ smooth() and noSmooth()
|
||||
X goes before the first beginDraw() with createGraphics()
|
||||
X sketchQuality() needs to be rooted out
|
||||
X don't make this final, since it'll break a bunch of code
|
||||
X it'd be a nice indicator for renderers, but not worth what it breaks
|
||||
_ https://github.com/processing/processing/issues/3357
|
||||
_ https://github.com/processing/processing-docs/issues/251
|
||||
_ can only be called inside setup(), show warning elsewhere
|
||||
_ is lifted out of setup() and into settings()
|
||||
X goes before the first beginDraw() with createGraphics()
|
||||
X sketchQuality() needs to be rooted out
|
||||
_ replace sketchXxxx() methods with another mechanism?
|
||||
_ and an internal dictionary that stores them all?
|
||||
_ intParam(), stringParam() and setParam()?
|
||||
|
||||
Reference in New Issue
Block a user