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

Re: [pygame] aaline



Bo Jangeborg wrote:

Lee Harr wrote:

When using the aaline to send multiple points how do you define the array?
The image is 100 x 100.

box = (1,1),(90,1)
pygame.draw.aaline(self.image, (0, 0, 0,alpha),1,box,1)

pygame.draw.aaline(self.image, (0, 0, 0,alpha), box[0], box[1], 1)

Sorry I was refering to the wrong function, its supposed to be aalines not aaline as I wrote.
The documentation simply says the following:
___________________________
aalines
pygame.draw.aalines(Surface, color, closed, point_array, blend=1) -> Rect
Draws a sequence on a surface. You must pass at least two points in the sequence of points. The closed argument is a simple boolean and if true, a line will be draw between the first and last points. The boolean blend argument set to true will blend the shades with existing shades instead of overwriting them. This function accepts floating point values for the end points.

This will respect the clipping rectangle. A bounding box of the effected area is returned as a rectangle.

The color argument must be an RGB sequence.

This function will temporarily lock the surface
_____________________________

So my question remains how do you define the points array ?

Bo)

Ok forget the last mail, I had messed up the rect . Its working now :)