Tao.Sdl SDK Documentation

Sdl.SDL_FillRect Method 

This function performs a fast fill of the given rectangle with some color.

[Visual Basic]
Public Shared Function SDL_FillRect( _
   ByVal surface As IntPtr, _
   ByRef rect As SDL_Rect, _
   ByVal color As Integer _
) As Integer
[C#]
public static int SDL_FillRect(
   IntPtr surface,
   ref SDL_Rect rect,
   int color
);

Parameters

surface
IntPtr to SDL_Surface
rect
IntPtr to SDL_Rect
color

Return Value

This function returns 0 on success, or -1 on error.

Remarks

This function performs a fast fill of the given rectangle with color. If dstrect is NULL, the whole surface will be filled with color.

The color should be a pixel of the format used by the surface, and can be generated by the SDL_MapRGB or SDL_MapRGBA functions. If the color value contains an alpha value then the destination is simply "filled" with that alpha information, no blending takes place.

If there is a clip rectangle set on the destination (set via SDL_SetClipRect) then this function will clip based on the intersection of the clip rectangle and the dstrect rectangle and the dstrect rectangle will be modified to represent the area actually filled.

Binds to C-function call in SDL_video.h:

            int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_MapRGB | SDL_MapRGBA | SDL_BlitSurface | Sdl.SDL_Rect