Rectangles going to the top left corner

I’ve been programming with processing for about a year now, and one thing I never found out was why the lines on rectangles go to the top left of the screen instead of to the sides of the rectangle. Anyone else experience this issue?

void setup() {
  size(640, 320);

void draw() {
  for (int i = 0; i < 32; i++) {
    for (int j = 0; j < 16; j++) {
      rect(i * 20, j * 20, i * 20 + 20, j * 20 + 20);


Seems like we have different output:

Yeah, my computer is probably just garbage.

This definitely should not be happening. Might be incompatible graphics card, out of date driver, or bad RAM. Seen things like it in the past, and they were generally hardware:

Try switching renderer to FX2D, for example size(400, 400, FX2D) as a potential workaround.