line function doesn't work with 16 bit color
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GASP Core |
Incomplete
|
High
|
James Hancock |
Bug Description
I've just been trying to learn Python using "How to Think Like a Computer Scientist". I reached this point where it refers to GASP and provides examples:
http://
Unfortunately Gasp wasn't included in the Ubuntu Python so went to FAQ 31 here, had a few false starts downloading and installing, but finally did.
Then tried the first example on that page above, and the circle drew and the box drew but the line errored out with:
>>> Line((100, 400), (580, 200))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
backend.
File "/usr/lib/
(end[0], flip_coords(end[1], obj.sprite.rect)), False)
ValueError: unsupported bit depth for aaline draw (supports 32 & 24 bit)
I don't know if this applies but I use a Thinkpad 600E and it has its graphics mode set to 16 bit color -- I have to do that to be able to run reasonably fast in Ubuntu. Other than GASP's line drawing function, I haven't had a single problem running anything else graphically in Ubuntu -- including vector graphics draw programs, 3D CAD renderers, and videos.
In fact the GASP box and circle functions drew fine -- only the line function had this problem.
Computer:Thinkpad 600E, Ubuntu 7.10, Python, 1024 x 768 x 16 bit color
Changed in gasp-code: | |
assignee: | nobody → jlhancock |
importance: | Undecided → High |
milestone: | none → 0.2 |
status: | New → Confirmed |
To fix this bug you will need to create a pygame. display. Info() instance and use that to find the bit display of the current display window.
then draw lines(blah...) if it is 16 bit
and aalines(blah) for everything else.
cheers,
James Hancock