Skip to content

Commit 6dd0aaa

Browse files
committed
Update for pop() and push() reference
1 parent 818b9ba commit 6dd0aaa

File tree

1 file changed

+65
-3
lines changed

1 file changed

+65
-3
lines changed

core/src/processing/core/PGraphics.java

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
Part of the Processing project - http://processing.org
55
6-
Copyright (c) 2013-15 The Processing Foundation
6+
Copyright (c) 2013-19 The Processing Foundation
77
Copyright (c) 2004-12 Ben Fry and Casey Reas
88
Copyright (c) 2001-04 Massachusetts Institute of Technology
99
@@ -5164,13 +5164,75 @@ protected void textCharScreenImpl(PImage glyph,
51645164

51655165
// PARITY WITH P5.JS
51665166

5167-
5167+
/**
5168+
* ( begin auto-generated from push.xml )
5169+
*
5170+
* The <b>push()</b> function saves the current drawing style
5171+
* settings and transformations, while <b>pop()</b> restores these
5172+
* settings. Note that these functions are always used together.
5173+
* They allow you to change the style and transformation settings
5174+
* and later return to what you had. When a new state is started
5175+
* with push(), it builds on the current style and transform
5176+
* information.<br />
5177+
* <br />
5178+
* <b>push() stores information related to the current
5179+
* transformation state and style settings controlled by the
5180+
* following functions: <b>rotate()</b>, <b>translate()</b>,
5181+
* <b>scale()</b>, <b>fill()</b>, <b>stroke()</b>, <b>tint()</b>,
5182+
* <b>strokeWeight()</b>, <b>strokeCap()</b>, <b>strokeJoin()</b>,
5183+
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>,
5184+
* <b>colorMode()</b>, <b>textAlign()</b>, <b>textFont()</b>,
5185+
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>.<br />
5186+
* <br />
5187+
* The <b>push()</b> and <b>pop()</b> functions were added with
5188+
* Processing 3.5. They can be used in place of <b>pushMatrix()</b>,
5189+
* <b>popMatrix()</b>, <b>pushStyles()</b>, and <b>popStyles()</b>.
5190+
* The difference is that push() and pop() control both the
5191+
* transformations (rotate, scale, translate) and the drawing styles
5192+
* at the same time.
5193+
*
5194+
* ( end auto-generated )
5195+
*
5196+
* @webref structure
5197+
* @see PGraphics#pop()
5198+
*/
51685199
public void push() {
51695200
pushStyle();
51705201
pushMatrix();
51715202
}
51725203

5173-
5204+
/**
5205+
* ( begin auto-generated from pop.xml )
5206+
*
5207+
* The <b>pop()</b> function restores the previous drawing style
5208+
* settings and transformations after <b>push()</b> has changed them.
5209+
* Note that these functions are always used together. They allow
5210+
* you to change the style and transformation settings and later
5211+
* return to what you had. When a new state is started with push(),
5212+
* it builds on the current style and transform information.<br />
5213+
* <br />
5214+
* <br />
5215+
* <b>push() stores information related to the current
5216+
* transformation state and style settings controlled by the
5217+
* following functions: <b>rotate()</b>, <b>translate()</b>,
5218+
* <b>scale()</b>, <b>fill()</b>, <b>stroke()</b>, <b>tint()</b>,
5219+
* <b>strokeWeight()</b>, <b>strokeCap()</b>, <b>strokeJoin()</b>,
5220+
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>,
5221+
* <b>colorMode()</b>, <b>textAlign()</b>, <b>textFont()</b>,
5222+
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>.<br />
5223+
* <br />
5224+
* The <b>push()</b> and <b>pop()</b> functions were added with
5225+
* Processing 3.5. They can be used in place of <b>pushMatrix()</b>,
5226+
* <b>popMatrix()</b>, <b>pushStyles()</b>, and <b>popStyles()</b>.
5227+
* The difference is that push() and pop() control both the
5228+
* transformations (rotate, scale, translate) and the drawing styles
5229+
* at the same time.
5230+
*
5231+
* ( end auto-generated )
5232+
*
5233+
* @webref structure
5234+
* @see PGraphics#push()
5235+
*/
51745236
public void pop() {
51755237
popStyle();
51765238
popMatrix();

0 commit comments

Comments
 (0)