[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [SPAM: 3.000] [pygame] thinking of changing gfxdraw module...



On Wed, Jun 1, 2011 at 2:47 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
On Tue, May 31, 2011 at 10:02 PM, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
René Dudfield wrote:

I'm thinking of removing the single calls, and only having multiple ones available - to force people into using the more efficient methods.

-1 if this means I'd have to build a list if I just want
to draw one item, because that introduces inefficiencies
of its own and makes the code less clear.


I understand the concerns about readability, and speed impacts.

However, I'm not sure it adds much clutter visually for the single use case.  Just add a couple of extra brackets. 

Also, the most common use case is drawing multiple items.  I can't think of one real application where I've only drawn one element off the top of my head.

I've had applications where I want to draw a single line, and many where I've wanted to draw a single circle, arc, or polygon.

I don't expect that performance is a big issue, but I think it makes sense to have a version for just drawing a single item. Every graphical API that I'm familiar with allows you to draw a single item without putting it in a container. Is it common not to? Should pygame.draw.line be deprecated as well?

-Christopher