Re: [pygame] How does pygame.draw.rect border width work?

2017-11-02 Thread Zexx Moore
Thank you Luke, for your reply. I find it funny I never thought about doing it like Yann suggested, but I've implemented it and it works as I thought it the original should have. On Thu, Nov 2, 2017 at 10:32 PM, Luke Paireepinart wrote: > I think this happens because

Re: [pygame] How does pygame.draw.rect border width work?

2017-11-02 Thread Luke Paireepinart
I think this happens because the border is drawn with line segments between discrete points so the corners never get filled in for widths above 1. I remember running into this in the past and I solved it the same way, using stacked rects. On Nov 2, 2017 9:25 AM, "Zexx Moore"

Re: [pygame] How does pygame.draw.rect border width work?

2017-11-02 Thread Zexx Moore
Thanks for the reply Yann. I had figured my math was wrong, but it seemed pretty basic to me. You did give me an alternative, which is going to be much easier then what I had been trying to do. My thinking now is that I can draw three solid rects, one that will be the border, another rect for

RE: [pygame] How does pygame.draw.rect border width work?

2017-11-02 Thread Yann Thorimbert
Hello, When I need a true border, I simply draw two rects, the seconde one hiding the first one in such a way that the rest of the first one constitutes the border. I don't know why the default behaviour of draw.rect() is this strange border for width bigger than 1. Cheers, Yann

[pygame] How does pygame.draw.rect border width work?

2017-11-02 Thread N2TheRed
I've been trying to make a percent bar class that I can use to represent health or speed, but the border width is causing issues. The goal is to make an outer rectangle frame of a specified border width while using a solid rect inside it to represent a percentage.