Re: [pygame] Bug in pygame.draw.ellipse

2015-02-15 Thread Lorenz Quack

I created an Issue:
https://bitbucket.org/pygame/pygame/issue/233/


On 09/02/15 14:20, Florian Krause wrote:

I was actually wrong. It seems even worse. Pyjama is not capable to draw 
ellipses with odd sizes at all. It will always
be the same ellipse as x-1, y-1.
E.g. an elipse with size 3,3 will result in the same ellipse as the one with 
size 2,2.
Can anyone reproduce this?

On Mon, Feb 9, 2015 at 1:36 PM, leo kirotawa kirot...@gmail.com 
mailto:kirot...@gmail.com wrote:

Since pygame is bind for SDL , have you tried in pure SDL ?  Maybe
it`s bug from there :)

On Mon, Feb 9, 2015 at 10:05 AM, diliup gabadamudalige
dili...@gmail.com mailto:dili...@gmail.com wrote:
  The mysteries of pygame.
 
  On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com 
mailto:siebenhundertz...@gmail.com wrote:
 
  Hi there,
 
  there seems to be a bug in pygame.draw.ellipse, where if either x or y 
of
  size is odd, then the resulting eclipse will have a real size of x-2, 
y-2.
 
  So basically, to draw an ellipse that has 3 x 3 pixels on the screen, 
one
  needs to use pygame.ellispe.draw with a size of 5 x 5.
 
  Best,
  Florian
 
 
 
  --
  www.fladd.de http://www.fladd.de - Homepage of Florian Krause



--

--
Leônidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com http://corecode.wordpress.com




--
www.fladd.de http://www.fladd.de - Homepage of Florian Krause




Re: [pygame] Bug in pygame.draw.ellipse

2015-02-11 Thread Gino Ingras
Would like an admin please email me to set up an account on pygame.org

2015-02-09 15:58 GMT+01:00 Lorenz Quack d...@amberfisharts.com:

 Not a bug in SDL since the draw.ellipse function implements the ellipse
 logic itself.
 I didn't try to reproduce the code but it makes sense from looking at the
 source. There are calls like this:
 draw_ellipse(surf, rect-x+rect-w/2, rect-y+rect-h/2,
  rect-w/2-loop, rect-h/2-loop, color);
 because the internal draw_ellipse function expects the midpoint and two
 radii. Note that the 4 middle arguments are of type int so the division by
 two gets floored so any odd width or height is essentially the same as the
 next lower even number (as far as the code draw_ellipse function is
 concerned).
 I therefore think this bug report is legit.

 Cheers,
 Lorenz


 On 09/02/15 14:20, Florian Krause wrote:

 I was actually wrong. It seems even worse. Pyjama is not capable to draw
 ellipses with odd sizes at all. It will always
 be the same ellipse as x-1, y-1.
 E.g. an elipse with size 3,3 will result in the same ellipse as the one
 with size 2,2.
 Can anyone reproduce this?

 On Mon, Feb 9, 2015 at 1:36 PM, leo kirotawa kirot...@gmail.com mailto:
 kirot...@gmail.com wrote:

 Since pygame is bind for SDL , have you tried in pure SDL ?  Maybe
 it`s bug from there :)

 On Mon, Feb 9, 2015 at 10:05 AM, diliup gabadamudalige
 dili...@gmail.com mailto:dili...@gmail.com wrote:
   The mysteries of pygame.
  
   On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com
 mailto:siebenhundertz...@gmail.com wrote:
  
   Hi there,
  
   there seems to be a bug in pygame.draw.ellipse, where if either x
 or y of
   size is odd, then the resulting eclipse will have a real size of
 x-2, y-2.
  
   So basically, to draw an ellipse that has 3 x 3 pixels on the
 screen, one
   needs to use pygame.ellispe.draw with a size of 5 x 5.
  
   Best,
   Florian
  
  
  





Re: [pygame] Bug in pygame.draw.ellipse

2015-02-09 Thread Lorenz Quack

Not a bug in SDL since the draw.ellipse function implements the ellipse logic 
itself.
I didn't try to reproduce the code but it makes sense from looking at the 
source. There are calls like this:
draw_ellipse(surf, rect-x+rect-w/2, rect-y+rect-h/2,
 rect-w/2-loop, rect-h/2-loop, color);
because the internal draw_ellipse function expects the midpoint and two radii. Note that the 4 middle arguments are of 
type int so the division by two gets floored so any odd width or height is essentially the same as the next lower even 
number (as far as the code draw_ellipse function is concerned).

I therefore think this bug report is legit.

Cheers,
Lorenz


On 09/02/15 14:20, Florian Krause wrote:

I was actually wrong. It seems even worse. Pyjama is not capable to draw 
ellipses with odd sizes at all. It will always
be the same ellipse as x-1, y-1.
E.g. an elipse with size 3,3 will result in the same ellipse as the one with 
size 2,2.
Can anyone reproduce this?

On Mon, Feb 9, 2015 at 1:36 PM, leo kirotawa kirot...@gmail.com 
mailto:kirot...@gmail.com wrote:

Since pygame is bind for SDL , have you tried in pure SDL ?  Maybe
it`s bug from there :)

On Mon, Feb 9, 2015 at 10:05 AM, diliup gabadamudalige
dili...@gmail.com mailto:dili...@gmail.com wrote:
  The mysteries of pygame.
 
  On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com 
mailto:siebenhundertz...@gmail.com wrote:
 
  Hi there,
 
  there seems to be a bug in pygame.draw.ellipse, where if either x or y 
of
  size is odd, then the resulting eclipse will have a real size of x-2, 
y-2.
 
  So basically, to draw an ellipse that has 3 x 3 pixels on the screen, 
one
  needs to use pygame.ellispe.draw with a size of 5 x 5.
 
  Best,
  Florian
 
 
 




[pygame] Bug in pygame.draw.ellipse

2015-02-09 Thread Florian Krause
Hi there,

there seems to be a bug in pygame.draw.ellipse, where if either x or y of
size is odd, then the resulting eclipse will have a real size of x-2, y-2.

So basically, to draw an ellipse that has 3 x 3 pixels on the screen, one
needs to use pygame.ellispe.draw with a size of 5 x 5.

Best,
Florian



-- 
www.fladd.de - Homepage of Florian Krause


Re: [pygame] Bug in pygame.draw.ellipse

2015-02-09 Thread diliup gabadamudalige
The mysteries of pygame.
On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com wrote:

 Hi there,

 there seems to be a bug in pygame.draw.ellipse, where if either x or y of
 size is odd, then the resulting eclipse will have a real size of x-2, y-2.

 So basically, to draw an ellipse that has 3 x 3 pixels on the screen, one
 needs to use pygame.ellispe.draw with a size of 5 x 5.

 Best,
 Florian



 --
 www.fladd.de - Homepage of Florian Krause



Re: [pygame] Bug in pygame.draw.ellipse

2015-02-09 Thread Florian Krause
I was actually wrong. It seems even worse. Pyjama is not capable to draw
ellipses with odd sizes at all. It will always be the same ellipse as x-1,
y-1.
E.g. an elipse with size 3,3 will result in the same ellipse as the one
with size 2,2.
Can anyone reproduce this?

On Mon, Feb 9, 2015 at 1:36 PM, leo kirotawa kirot...@gmail.com wrote:

 Since pygame is bind for SDL , have you tried in pure SDL ?  Maybe
 it`s bug from there :)

 On Mon, Feb 9, 2015 at 10:05 AM, diliup gabadamudalige
 dili...@gmail.com wrote:
  The mysteries of pygame.
 
  On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com
 wrote:
 
  Hi there,
 
  there seems to be a bug in pygame.draw.ellipse, where if either x or y
 of
  size is odd, then the resulting eclipse will have a real size of x-2,
 y-2.
 
  So basically, to draw an ellipse that has 3 x 3 pixels on the screen,
 one
  needs to use pygame.ellispe.draw with a size of 5 x 5.
 
  Best,
  Florian
 
 
 
  --
  www.fladd.de - Homepage of Florian Krause



 --

 --
 Leônidas S. Barbosa (Kirotawa)
 blog: corecode.wordpress.com




-- 
www.fladd.de - Homepage of Florian Krause


Re: [pygame] Bug in pygame.draw.ellipse

2015-02-09 Thread leo kirotawa
Since pygame is bind for SDL , have you tried in pure SDL ?  Maybe
it`s bug from there :)

On Mon, Feb 9, 2015 at 10:05 AM, diliup gabadamudalige
dili...@gmail.com wrote:
 The mysteries of pygame.

 On 9 Feb 2015 16:25, Florian Krause siebenhundertz...@gmail.com wrote:

 Hi there,

 there seems to be a bug in pygame.draw.ellipse, where if either x or y of
 size is odd, then the resulting eclipse will have a real size of x-2, y-2.

 So basically, to draw an ellipse that has 3 x 3 pixels on the screen, one
 needs to use pygame.ellispe.draw with a size of 5 x 5.

 Best,
 Florian



 --
 www.fladd.de - Homepage of Florian Krause



-- 

--
Leônidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com