Re : Clip Rect

Can a clipping rectangle be used to blit on the screen and ensure that you don’t blit above the screen’s
boundaries ?

----- Message d’origine ----De : Mason Wheeler
? : A list for developers using the SDL library. (includes SDL-announce)
Envoy? le : Vendredi, 4 Juillet 2008, 16h29mn 28s
Objet : Re: [SDL] Clip Rect

It’s pretty simple. When you put a ClipRect on a surface, then that becomes the only “drawable” portion of the surface. In other words, if you use a surface with a ClipRect as the destination surface for a blit, it won’t draw to anything outside the defined rectangle, even if the source image is large enough to go beyond those boundaries.

----- Original Message ----
From: julien CLEMENT <@Julien_Clement1>
Subject: [SDL] Clip Rect

Hi all,

I have a very basic request to make.
Can someone explain me exactly the usage of SDL_SetClipRect and SDL_GetClipRect ?

Do those functions affect the behavior of SDL_BlitSurface ?
How ?
What is clipped exactly ?

Thank you

Julien


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  _____________________________________________________________________________ 

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Can a clipping rectangle be used to blit on the screen and ensure that you
don’t blit above the screen’s boundaries ?

Above? In any case, the destination surface is implicitly clipped to,
so setting a clipping rectangle that’s equal to the size of the
surface (with a 0, 0 origin) is equivalent to not having a clipping
rectangle.On Fri, Jul 4, 2008 at 11:29 AM, julien CLEMENT wrote:


http://pphaneuf.livejournal.com/