public void pushStyle() { g.pushStyle(); }
/** * ( begin auto-generated from pushStyle.xml ) * * The <b>pushStyle()</b> function saves the current style settings and * <b>popStyle()</b> restores the prior settings. Note that 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.) * <br /><br /> * The style information controlled by the following functions are included * in the style: * fill(), stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(), * imageMode(), rectMode(), ellipseMode(), shapeMode(), colorMode(), * textAlign(), textFont(), textMode(), textSize(), textLeading(), * emissive(), specular(), shininess(), ambient() * * ( end auto-generated ) * * @webref structure * @see PGraphics#popStyle() */ public void pushStyle() { if (recorder != null) recorder.pushStyle(); g.pushStyle(); }
protected void pre(PGraphics g) { if (matrix != null) { g.pushMatrix(); g.applyMatrix(matrix); } /* strokeSaved = g.stroke; strokeColorSaved = g.strokeColor; strokeWeightSaved = g.strokeWeight; strokeCapSaved = g.strokeCap; strokeJoinSaved = g.strokeJoin; fillSaved = g.fill; fillColorSaved = g.fillColor; rectModeSaved = g.rectMode; ellipseModeSaved = g.ellipseMode; shapeModeSaved = g.shapeMode; */ if (style) { g.pushStyle(); styles(g); } }
protected void pre(PGraphics g) { if (matrix != null) { g.pushMatrix(); g.applyMatrix(matrix); } /* strokeSaved = g.stroke; strokeColorSaved = g.strokeColor; strokeWeightSaved = g.strokeWeight; strokeCapSaved = g.strokeCap; strokeJoinSaved = g.strokeJoin; fillSaved = g.fill; fillColorSaved = g.fillColor; rectModeSaved = g.rectMode; ellipseModeSaved = g.ellipseMode; shapeModeSaved = g.shapeMode; */ if (style) { g.pushStyle(); styles(g); } }
/** * 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(); }