@Override public void popStyle() { // popStyle() sets ambient to true (because it calls ambient() in style()) // and so setting the setAmbient flag to true, even if the user didn't call // ambient, so need to revert to false. boolean savedSetAmbient = setAmbient; super.popStyle(); if (!savedSetAmbient) setAmbient = false; }
@Override public void popStyle() { // popStyle() sets ambient to true (because it calls ambient() in style()) // and so setting the setAmbient flag to true, even if the user didn't call // ambient, so need to revert to false. boolean savedSetAmbient = setAmbient; super.popStyle(); if (!savedSetAmbient) setAmbient = false; }
public void popStyle() { g.popStyle(); }
/** * ( begin auto-generated from popStyle.xml ) * * The <b>pushStyle()</b> function saves the current style settings and * <b>popStyle()</b> restores the prior settings; these functions are * always used together. They allow you to change the style settings and * later return to what you had. When a new style is started with * <b>pushStyle()</b>, it builds on the current style information. The * <b>pushStyle()</b> and <b>popStyle()</b> functions can be embedded to * provide more control (see the second example above for a demonstration.) * * ( end auto-generated ) * * @webref structure * @see PGraphics#pushStyle() */ public void popStyle() { if (recorder != null) recorder.popStyle(); g.popStyle(); }
protected void post(PGraphics g) { // for (int i = 0; i < childCount; i++) { // children[i].draw(g); // } /* // TODO this is not sufficient, since not saving fillR et al. g.stroke = strokeSaved; g.strokeColor = strokeColorSaved; g.strokeWeight = strokeWeightSaved; g.strokeCap = strokeCapSaved; g.strokeJoin = strokeJoinSaved; g.fill = fillSaved; g.fillColor = fillColorSaved; g.ellipseMode = ellipseModeSaved; */ if (matrix != null) { g.popMatrix(); } if (style) { g.popStyle(); } }
protected void post(PGraphics g) { // for (int i = 0; i < childCount; i++) { // children[i].draw(g); // } /* // TODO this is not sufficient, since not saving fillR et al. g.stroke = strokeSaved; g.strokeColor = strokeColorSaved; g.strokeWeight = strokeWeightSaved; g.strokeCap = strokeCapSaved; g.strokeJoin = strokeJoinSaved; g.fill = fillSaved; g.fillColor = fillColorSaved; g.ellipseMode = ellipseModeSaved; */ if (matrix != null) { g.popMatrix(); } if (style) { g.popStyle(); } }
/** * Actual implementation of clearing the background, now that the * internal variables for background color have been set. Called by the * backgroundFromCalc() method, which is what all the other background() * methods call once the work is done. */ protected void backgroundImpl() { pushStyle(); pushMatrix(); resetMatrix(); fill(backgroundColor); rect(0, 0, width, height); popMatrix(); popStyle(); }
/** * Actual implementation of clearing the background, now that the * internal variables for background color have been set. Called by the * backgroundFromCalc() method, which is what all the other background() * methods call once the work is done. */ protected void backgroundImpl() { pushStyle(); pushMatrix(); resetMatrix(); fill(backgroundColor); rect(0, 0, width, height); popMatrix(); popStyle(); }