[SDL] Re: Surface coordinates can't be less than zero?

David Olofson david at olofson.net
Sun Nov 27 00:33:42 PST 2005

On Sunday 27 November 2005 03.25, Nick Stovall wrote:
> > If that's the case, you simply need to remember to re-set the
> > SDL_Rect(s) at the appropriate time(s).
> > 
> > -bill!
> No, the problem is that if I try to blit a surface using a dest rect
> that has an X or Y coordinate that is less than zero, they get set
> to zero when they get blitted. 

Exactly - that's the result of the clipping operation, and that's what 
SDL writes back into the destination rectangle. w and/or h should 
alse be affected in this case, and if you hit the right or bottom 
edge of the target, clipping should affect *only* w and/or h.

//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