[SDL] I don't know use a algorit for line

David Olofson david at olofson.net
Sun Nov 20 15:51:01 PST 2005


On Sunday 20 November 2005 18.07, Gustavo wrote:
[...]
>     diblinea(0,0,screen->w,screen->h,SDL_MapRGB(screen->format,0xff,
                   ^^^^^^^^^^^^^^^^^^^
(screen->w, screen->h) - that is, (640, 480) - is just outside the 
bottom right corner of the screen, and since the line drawing 
algorithm you're using does not implement clipping, it actually tries 
to write to this pixel.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list