mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +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) {
|
||||
|
||||
Reference in New Issue
Block a user