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

Tom Wilson t.wilson at hazid.com
Sun Nov 27 14:46:59 PST 2005

David Olofson wrote:
> On Sunday 27 November 2005 19.20, Tom Wilson wrote:
> [...]
>>>The problem with that is that when I blit the buffer to the
>>>screen, its X- and Y- coordinates will still be set to 0, just
>>>like any other surface.
>>You won't be using -X and -Y co-ordinates to blit.
>>It will solve your problem.
>>You blit the offscreen surface *from*  25,25 to 125,125  to the
>>*screen* at 0,0
>>No negative co-ordinates are involved.
> That does indeed avoid the "problem", and it is the obvious way of 
> doing it in a few rare cases - but I can't see the point in 
> reinventing clipping outside SDL, especially since SDL will do the 
> clipping tests either way. (Unless you bypass the official API, that 
> is.)
Fair point on clipping,

But I thought this guy said that if he feeds in a negative co-ordinate 
for a destination blit, it [SDL] zero's the co-ordinates.  I assumed 
this caused the blit to go to the wrong place on the screen?

- Tom

\ /    ASCII Ribbon Campaign
  X   against HTML email & vCards
/ \

More information about the SDL mailing list