|
Size: 1847
Comment: update formatting - enums, structs, the/an
|
← Revision 5 as of 2011-01-07 17:47:36 ⇥
Size: 874
Comment: update content - w/ Sam; remove draft
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 6: | Line 5: |
| Use this function to get the clipping rectangle for the destination surface in a blit. | Use this function to get the clipping rectangle for a surface. |
| Line 18: | Line 17: |
| ||'''rect'''||,,must be a pointer to a valid rectangle which will be filled with the correct values,, ''-or-'' an [[SDL_Rect]] structure filled in with the clipping rectangle for the surface^; see [[#Remarks|Remarks]] for details^|| | ||'''rect'''||an [[SDL_Rect]] structure filled in with the clipping rectangle for the surface; see [[#Remarks|Remarks]] for details|| |
| Line 26: | Line 25: |
| ''You can add useful comments here'' *<<BR>>When this '''surface''' is the destination of a blit, only the area within the clip rectangle is drawn into. The rectangle pointed to by '''rect''' will be filled with the clipping rectangle of the '''surface'''.<<BR>>* <<Color2(green,Should this state somewhere that the clipping rectangle is established by the blit function and not by this function? Is that correct? Does this function pull the info from `srcrect` or `dstrect` in [[SDL_BlitSurface]]() and fill '''rect''' here with it? Or from `rect` in [[SDL_SetClipRect]]()?)>><<BR>> <<Color2(green,Possible corresponding alternate text to replace the above between *?)>> When '''surface''' is the destination of a blit, '''rect''' is filled with the clipping rectangle for that surface from the `dstrect` component of [[SDL_BlitSurface]]() or `rect` from [[SDL_SetClipRect]](). |
When '''surface''' is the destination of a blit, only the area within the clip rectangle is drawn into. |
| Line 39: | Line 29: |
| .[[SDL_BlitSurface]] * | .[[SDL_BlitSurface]] |
SDL_GetClipRect
Use this function to get the clipping rectangle for a surface.
Syntax
void SDL_GetClipRect(SDL_Surface* surface,
SDL_Rect* rect)
Function Parameters
surface |
the SDL_Surface structure representing the surface to be clipped |
rect |
an SDL_Rect structure filled in with the clipping rectangle for the surface; see Remarks for details |
Code Examples
You can add your code example here
Remarks
When surface is the destination of a blit, only the area within the clip rectangle is drawn into.
