On Sun, Oct 26, 2008 at 4:34 PM, Lenard Lindstrom
<len-l@xxxxxxxxx> wrote:
Here are some more suggestions for the horizontal_line/vertical_line issue. Since they take integer positions I can think of two alternatives to "(surface, (x1, x2), y, color) and (surface, x, (y1, y2), color)". The first is to have no horizontal_line and vertical_line. Hide the the calls to the hlineRGBA and vlineRGBA gfx functions in the generic line function. A few extra tests to determine if a line is horizontal or vertical probably won't add much additional overhead to a Python function call. The other alternative is to use a start, length approach: (surface, (x1, y1), length, color). The length can be negative. This keeps the signature consistent for both the horizontal and vertical line functions.
Lenard
Lorenz Quack wrote:
Thanks a lot!
I just looked through your patch and I have some remarks:
[snip]
2) you grouped the arguments to horizontal and vertical line like this:
(surface, (x1, x2), y, color) and (surface, x, (y1, y2), color) respectively
I find this grouping not very intuitive. normally we group a pair of x and y
coordinates which makes sense because they represent one point but I can't see
such an interpretation here. one could argue to group them (surface, (x1, y),
x2, color) but that looks strange as well so I would suggest to not group them
at all
[snip]
Forrest Voight wrote:
Hi!
I'm posting the patch at http://im.forre.st/pygame-sdl_gfx.diff , so
that won't happen again.
It's pretty much a full binding of the shape drawing functions, but
there's some other stuff in SDL_gfx.
--
Lenard Lindstrom
<len-l@xxxxxxxxx>