(PStyle s)
| 6295 | |
| 6296 | |
| 6297 | public void style(PStyle s) { |
| 6298 | // if (s.smooth) { |
| 6299 | // smooth(); |
| 6300 | // } else { |
| 6301 | // noSmooth(); |
| 6302 | // } |
| 6303 | |
| 6304 | imageMode(s.imageMode); |
| 6305 | rectMode(s.rectMode); |
| 6306 | ellipseMode(s.ellipseMode); |
| 6307 | shapeMode(s.shapeMode); |
| 6308 | |
| 6309 | if (blendMode != s.blendMode) { |
| 6310 | blendMode(s.blendMode); |
| 6311 | } |
| 6312 | |
| 6313 | if (s.tint) { |
| 6314 | tint(s.tintColor); |
| 6315 | } else { |
| 6316 | noTint(); |
| 6317 | } |
| 6318 | if (s.fill) { |
| 6319 | fill(s.fillColor); |
| 6320 | } else { |
| 6321 | noFill(); |
| 6322 | } |
| 6323 | if (s.stroke) { |
| 6324 | stroke(s.strokeColor); |
| 6325 | } else { |
| 6326 | noStroke(); |
| 6327 | } |
| 6328 | strokeWeight(s.strokeWeight); |
| 6329 | strokeCap(s.strokeCap); |
| 6330 | strokeJoin(s.strokeJoin); |
| 6331 | |
| 6332 | // Set the colorMode() for the material properties. |
| 6333 | // TODO this is really inefficient, need to just have a material() method, |
| 6334 | // but this has the least impact to the API. |
| 6335 | colorMode(RGB, 1); |
| 6336 | ambient(s.ambientR, s.ambientG, s.ambientB); |
| 6337 | emissive(s.emissiveR, s.emissiveG, s.emissiveB); |
| 6338 | specular(s.specularR, s.specularG, s.specularB); |
| 6339 | shininess(s.shininess); |
| 6340 | |
| 6341 | /* |
| 6342 | s.ambientR = ambientR; |
| 6343 | s.ambientG = ambientG; |
| 6344 | s.ambientB = ambientB; |
| 6345 | s.specularR = specularR; |
| 6346 | s.specularG = specularG; |
| 6347 | s.specularB = specularB; |
| 6348 | s.emissiveR = emissiveR; |
| 6349 | s.emissiveG = emissiveG; |
| 6350 | s.emissiveB = emissiveB; |
| 6351 | s.shininess = shininess; |
| 6352 | */ |
| 6353 | // material(s.ambientR, s.ambientG, s.ambientB, |
| 6354 | // s.emissiveR, s.emissiveG, s.emissiveB, |
no test coverage detected