add redraw() after changing size of display

This commit is contained in:
benfry
2007-11-01 12:52:09 +00:00
parent 5812928c16
commit 8b49fb4e83
2 changed files with 12 additions and 0 deletions

View File

@@ -896,14 +896,18 @@ in */
* Component has been resized (by an event) and the renderer needs an update.
*/
protected void setRendererSize(int w, int h) {
boolean changed = false;
if (g == null) {
g = PApplet.createGraphics(w, h, JAVA2D, null, this);
} else if (w != g.width || h != g.height) {
g.resize(w, h);
changed = true;
}
width = w;
height = h;
if (changed) redraw();
//redraw = true;
/*
if (g == null) {
g = PApplet.createGraphics(w, h, nextRenderer, nextRendererPath, this);
@@ -8169,6 +8173,12 @@ in */
}
public void noLights() {
if (recorder != null) recorder.noLights();
g.noLights();
}
public void ambientLight(float red, float green, float blue) {
if (recorder != null) recorder.ambientLight(red, green, blue);
g.ambientLight(red, green, blue);

View File

@@ -1,6 +1,8 @@
0134 core
X add noLights() method
X http://dev.processing.org/bugs/show_bug.cgi?id=666
X redraw the screen after resize events (even with noLoop)
X http://dev.processing.org/bugs/show_bug.cgi?id=664
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .