Shape has weird behavior with 4 parameters

Hoï !

So I was trying to have a generic body class so it could represent the body of all my objects for some simulation but then this happened :

  void display()
  {
    shapeMode(CENTER);
    shape(body, 50, 50, 100, 100); // this doesn't work
    shape(body, 350, 350); // this works
  }

I tried some different formatting but everytime with x and y it works even without them but if I try with a b c d it doesn’t work anymore, the program runs but doens’t print anything. What have I done wrong ?

1 Like

so we must dig deeper,
here ( win 10 / 64bit / processing 3.5.3 / it works with

/* start from Scale Shape.   Illustration by George Brower.  */
//https://discourse.processing.org/t/shape-has-weird-behavior-with-4-parameters/15129

PShape bot;

void setup() {
  size(500, 500);
  bot = loadShape("bot1.svg");
  shapeMode(CENTER);
} 

void draw() {
  background(200,200,0);
  shape(bot, 50, 50, 100, 100); // this does work here
  shape(bot, 350, 350);
}

how about you share your shape?
and give more system info…

1 Like