Strange artifacts...

I noticed that there is a Python port, so I decided to test it out(since we've just finished our Python course at uni).

I made a little Pong game, but there are some rendering issues... When drawing the paddles, there seems to some tearing with the blending. Here's my paddle drawing code:

def draw(self):
        # Fill
        al_draw_filled_rounded_rectangle(self.x, self.y, self.x + self.w, self.y + self.h, 6, 6, self.color)
        # Highlight
        al_draw_filled_rounded_rectangle(self.x+2, self.y+2, self.x + self.w/2, self.y + self.h-5, 6, 6, al_map_rgba_f(0.2,0.2,0.2,0.2))

Here's my current output:

Any ideas why this is happening?


The width of your rounded rectangle is smaller than the sum of the radii of the rounds. Here's a blowup of what is happening:


I'd just decrease the radius of the rounds (to like 5 or 4 or something).


Thanks, that fixed it!

Thread #608774. Printed from