Drawing Functions
Primitives
Polygon
Transform
Surface
Drawing
Palette
Control
Misc
Defines
Extended

Arguments

Index
Credits

Return Name Arguments
Uint32SPG_GetPixelSDL_Surface* surface, Sint16 x, Sint16 y
intSPG_BlitSDL_Surface* Src, SDL_Rect* srcRect,
SDL_Surface* Dest, SDL_Rect* destRect
voidSPG_SetBlitvoid (*blitfn)(SDL_Surface*, SDL_Rect*, SDL_Surface*, SDL_Rect*)
<Blit_Fn>SPG_GetBlitnone
voidSPG_DrawSDL_Surface* source, SDL_Surface* dest, Sint16 x, Sint16 y
voidSPG_DrawBlitSDL_Surface* img, SDL_Surface* dest, Sint16 x, Sint16 y
voidSPG_PixelPatternSDL_Surface* surface, SDL_Rect target,
SPG_bool* pattern, Uint32* colors
voidSPG_PixelPatternBlendSDL_Surface* surface, SDL_Rect target,
SPG_bool* pattern, Uint32* colors, Uint8* pixelAlpha
voidSPG_FillSDL_Surface* surface, Uint32 color
voidSPG_FillAlphaSDL_Surface* surface, Uint32 color, Uint8 alpha
voidSPG_FloodFillSDL_Surface* dst, Sint16 x, Sint16 y, Uint32 color
voidSPG_BlockRead8SDL_Surface* Surface, Uint8* block, Sint16 y
voidSPG_BlockRead16SDL_Surface* Surface, Uint16* block, Sint16 y
voidSPG_BlockRead32SDL_Surface* Surface, Uint32* block, Sint16 y
voidSPG_BlockWrite8SDL_Surface* Surface, Uint8* block, Sint16 y
voidSPG_BlockWrite16SDL_Surface* Surface, Uint16* block, Sint16 y
voidSPG_BlockWrite32SDL_Surface* Surface, Uint32* block, Sint16 y


Uint32 SPG_GetPixel(SDL_Surface *surface, Sint16 x, Sint16 y)
- Returns the pixel's color value at (x,y) in the given surface's format.

int SPG_Blit(SDL_Surface *Src, SDL_Rect* srcRect, SDL_Surface *Dest, SDL_Rect* destRect)
- Draws the data from Src within the area defined by srcRect to destRect on Dest.  Performs the alpha-blending modes, can combine per-pixel and per-surface alpha, and is non-destructive of the given SDL_Rects.

void SPG_SetBlit(void (*blitfn)(SDL_Surface*, SDL_Rect*, SDL_Surface*, SDL_Rect*))
- Sets the custom blitting function used by SPG_Blit to the given function.

void SPG_Draw(SDL_Surface* source, SDL_Surface* dest, Sint16 x, Sint16 y)
- Quick convenience call for SDL_BlitSurface.

void SPG_DrawBlit(SDL_Surface* img, SDL_Surface* dest, Sint16 x, Sint16 y)
- Quick convenience call for SPG_Blit.

void SPG_PixelPattern(SDL_Surface *surface, SDL_Rect target, SPG_bool* pattern, Uint32* colors)
- Draws a pattern of pixels defined by the given bit pattern to the area represented by 'target' on the given surface.  You provide an array of 1's and 0's that tell the function where to draw, and an array of colors to tell it what to draw.

void SPG_PixelPatternBlend(SDL_Surface *surface, SDL_Rect target, SPG_bool* pattern, Uint32* colors, Uint8* pixelAlpha)
- Alpha-blends a pattern of pixels defined by the given bit pattern to the area represented by 'target' on the given surface.  You provide an array of 1's and 0's that tell the function where to draw, an array of colors to tell it what to draw, and an array of alpha values to tell it how to blend.

void SPG_Fill(SDL_Surface *surface, Uint32 color)
- Changes every pixel on the surface to the given color value.

void SPG_FillAlpha(SDL_Surface *surface, Uint32 color, Uint8 alpha)
- Changes every pixel on the surface to the given color value (includes alpha value).

void SPG_FloodFill(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color)
- Changes the color of all pixels contiguous to (x,y) to the given color.

void SPG_BlockRead8(SDL_Surface *Surface, Uint8 *block, Sint16 y)
- Reads an entire scanline of 8-bit data from the surface

void SPG_BlockRead16(SDL_Surface *Surface, Uint16 *block, Sint16 y)
- Reads an entire scanline of 16-bit data from the surface

void SPG_BlockRead32(SDL_Surface *Surface, Uint32 *block, Sint16 y)
- Reads an entire scanline of 32-bit data from the surface

void SPG_BlockWrite8(SDL_Surface *Surface, Uint8 *block, Sint16 y)
- Writes an entire scanline of data to target 8-bit surface

void SPG_BlockWrite16(SDL_Surface *Surface, Uint16 *block, Sint16 y)
- Writes an entire scanline of data to target 16-bit surface

void SPG_BlockWrite32(SDL_Surface *Surface, Uint32 *block, Sint16 y)
- Writes an entire scanline of data to target 32-bit surface


SPriG v0.94 Documentation by Jonathan Dearborn 2008