rect fill glitch when using translate with negative x

I've encountered some glitchy behavior which I've distilled down to this example.

void setup() {
  //size(800, 400, P2D);
  size(800, 400);
  noStroke(); fill(255);
}

void draw() {
  background(128);

  pushMatrix();
    translate(-500, 150);
    rotate(radians(1.2));
    rect(0, -25, 1200, 50);
  popMatrix();
}

The expected output is a single solid white stripe, but what I get is a stripe with a few lines of pixels missing. This only happens at certain (unpredictable) transform rotations, and only when the translate has a negative x value. The greater the negative value, the wider the line of missing pixels. It also doesn't happen when using the P2D renderer.

Is this known behavior? Is there something I should do to avoid it (besides not using negative x values)?

I'm using Processing 3.0.2.

Answers

  • Seeing the same behavior in Processing 2.2.1, so this isn't a new issue. It's certainly not right.

  • Answer ✓

    it's not supposed to happen. it's a bug and wasn't reported yet.

  • Answer ✓

    I suggest you post an issue on Github

  • Thanks, good to know.

    I have no idea how to file a bug report, or use Github. Anyone feel like doing it for me, or at least give me some pointers?

  • Answer ✓

    I have raised an issue which you can view here.

  • Thank you!

Sign In or Register to comment.