Can't use the original functions in processing 4.0's class?

When I use rect(),or line() in classes, it works in processing 3.
But I don’t know what is going on in processing 4.


class t{
  t(){}
  void test(){
    rect(0,0,30,50);
  }
}

The function rect(int, int, int, int) does not exist.

Is this your entire code

Add setup and draw

Reopened it and it worked just fine.

1 Like