MCPcopy Index your code
hub / github.com/processing/processing / style

Method style

core/src/processing/core/PGraphics.java:6267–6343  ·  view source on GitHub ↗
(PStyle s)

Source from the content-addressed store, hash-verified

6265
6266
6267 public void style(PStyle s) {
6268 // if (s.smooth) {
6269 // smooth();
6270 // } else {
6271 // noSmooth();
6272 // }
6273
6274 imageMode(s.imageMode);
6275 rectMode(s.rectMode);
6276 ellipseMode(s.ellipseMode);
6277 shapeMode(s.shapeMode);
6278
6279 if (blendMode != s.blendMode) {
6280 blendMode(s.blendMode);
6281 }
6282
6283 if (s.tint) {
6284 tint(s.tintColor);
6285 } else {
6286 noTint();
6287 }
6288 if (s.fill) {
6289 fill(s.fillColor);
6290 } else {
6291 noFill();
6292 }
6293 if (s.stroke) {
6294 stroke(s.strokeColor);
6295 } else {
6296 noStroke();
6297 }
6298 strokeWeight(s.strokeWeight);
6299 strokeCap(s.strokeCap);
6300 strokeJoin(s.strokeJoin);
6301
6302 // Set the colorMode() for the material properties.
6303 // TODO this is really inefficient, need to just have a material() method,
6304 // but this has the least impact to the API.
6305 colorMode(RGB, 1);
6306 ambient(s.ambientR, s.ambientG, s.ambientB);
6307 emissive(s.emissiveR, s.emissiveG, s.emissiveB);
6308 specular(s.specularR, s.specularG, s.specularB);
6309 shininess(s.shininess);
6310
6311 /*
6312 s.ambientR = ambientR;
6313 s.ambientG = ambientG;
6314 s.ambientB = ambientB;
6315 s.specularR = specularR;
6316 s.specularG = specularG;
6317 s.specularB = specularB;
6318 s.emissiveR = emissiveR;
6319 s.emissiveG = emissiveG;
6320 s.emissiveB = emissiveB;
6321 s.shininess = shininess;
6322 */
6323 // material(s.ambientR, s.ambientG, s.ambientB,
6324 // s.emissiveR, s.emissiveG, s.emissiveB,

Callers 1

popStyleMethod · 0.95

Calls 15

imageModeMethod · 0.95
rectModeMethod · 0.95
ellipseModeMethod · 0.95
shapeModeMethod · 0.95
blendModeMethod · 0.95
tintMethod · 0.95
noTintMethod · 0.95
fillMethod · 0.95
noFillMethod · 0.95
strokeMethod · 0.95
noStrokeMethod · 0.95
strokeWeightMethod · 0.95

Tested by

no test coverage detected