Back to all rules
What this rule checks
Uses shape(), loadShape() or createShape() to work with PShape objects
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  ellipse(mouseX, mouseY, 40, 40);  // drawn directly each frame
}
FAIL — this code triggers the rule
PShape ball;

void setup() {
  size(400, 400);
  ball = createShape(ELLIPSE, 0, 0, 40, 40);
}

void draw() {
  background(255);
  shape(ball, mouseX, mouseY);
}
Overview
Category Out of Scope
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasShapeMethodRule
Message template shape() function usage found.