@@ -335,7 +335,7 @@ public class PGraphics extends PImage implements PConstants {
335335 // Style stack
336336
337337 static final int STYLE_STACK_DEPTH = 64 ;
338- Style [] styleStack = new Style [STYLE_STACK_DEPTH ];
338+ PStyle [] styleStack = new PStyle [STYLE_STACK_DEPTH ];
339339 int styleStackDepth ;
340340
341341
@@ -1141,7 +1141,7 @@ public void endShape(int mode) {
11411141 // STYLE
11421142
11431143
1144- public void style (Style s ) {
1144+ public void style (PStyle s ) {
11451145 if (s .smooth ) {
11461146 smooth ();
11471147 } else {
@@ -3268,53 +3268,14 @@ public float modelZ(float x, float y, float z) {
32683268 // STYLE
32693269
32703270
3271- protected class Style {
3272- public boolean smooth ;
3273-
3274- public int imageMode ;
3275- public int rectMode ;
3276- public int ellipseMode ;
3277- public int shapeMode ;
3278-
3279- public int colorMode ;
3280- public float colorModeX ;
3281- public float colorModeY ;
3282- public float colorModeZ ;
3283- public float colorModeA ;
3284-
3285- public boolean tint ;
3286- public int tintColor ;
3287- public boolean fill ;
3288- public int fillColor ;
3289- public boolean stroke ;
3290- public int strokeColor ;
3291- public float strokeWeight ;
3292- public int strokeCap ;
3293- public int strokeJoin ;
3294-
3295- // TODO these fellas are inconsistent, and may need to go elsewhere
3296- public float ambientR , ambientG , ambientB ;
3297- public float specularR , specularG , specularB ;
3298- public float emissiveR , emissiveG , emissiveB ;
3299- public float shininess ;
3300-
3301- public PFont textFont ;
3302- public int textAlign ;
3303- public int textAlignY ;
3304- public int textMode ;
3305- public float textSize ;
3306- public float textLeading ;
3307- }
3308-
3309-
33103271 public void pushStyle () {
33113272 if (styleStackDepth == styleStack .length ) {
3312- styleStack = (Style []) PApplet .expand (styleStack );
3273+ styleStack = (PStyle []) PApplet .expand (styleStack );
33133274 }
33143275 if (styleStack [styleStackDepth ] == null ) {
3315- styleStack [styleStackDepth ] = new Style ();
3276+ styleStack [styleStackDepth ] = new PStyle ();
33163277 }
3317- Style s = styleStack [styleStackDepth ++];
3278+ PStyle s = styleStack [styleStackDepth ++];
33183279 getStyle (s );
33193280 }
33203281
@@ -3328,14 +3289,14 @@ public void popStyle() {
33283289 }
33293290
33303291
3331- public Style getStyle () {
3332- Style s = new Style ();
3292+ public PStyle getStyle () { // ignore
3293+ PStyle s = new PStyle ();
33333294 getStyle (s );
33343295 return s ;
33353296 }
33363297
33373298
3338- public void getStyle (Style s ) {
3299+ public void getStyle (PStyle s ) { // ignore
33393300 s .smooth = smooth ;
33403301
33413302 s .imageMode = imageMode ;
0 commit comments