|
3 | 3 | /* |
4 | 4 | Part of the Processing project - http://processing.org |
5 | 5 |
|
6 | | - Copyright (c) 2013-15 The Processing Foundation |
| 6 | + Copyright (c) 2013-19 The Processing Foundation |
7 | 7 | Copyright (c) 2004-12 Ben Fry and Casey Reas |
8 | 8 | Copyright (c) 2001-04 Massachusetts Institute of Technology |
9 | 9 |
|
@@ -5164,13 +5164,75 @@ protected void textCharScreenImpl(PImage glyph, |
5164 | 5164 |
|
5165 | 5165 | // PARITY WITH P5.JS |
5166 | 5166 |
|
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 | + */ |
5168 | 5199 | public void push() { |
5169 | 5200 | pushStyle(); |
5170 | 5201 | pushMatrix(); |
5171 | 5202 | } |
5172 | 5203 |
|
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 | + */ |
5174 | 5236 | public void pop() { |
5175 | 5237 | popStyle(); |
5176 | 5238 | popMatrix(); |
|
0 commit comments