| Drawing Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Primitives Polygon Transform Surface Drawing Dirty Rect Palette Control Misc Defines Types Extended Arguments Index Credits |
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. Alpha-blending modes will only work on 32-bit RGBA surfaces. The available blitting modes are:
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. <Blit_Fn> SPG_GetBlit() - Returns the current blitting function. SDL_Surface* SPG_ReplaceColor(SDL_Surface* src, SDL_Rect* srcrect, SDL_Surface* dest, SDL_Rect* destrect, Uint32 color) - Returns a new surface with the given color replaced by the corresponding pixels from the src surface. This is an effect similar to palette-swapping on 8-bit surfaces, but allows for images and gradients to replace the color. void SPG_Draw(SDL_Surface* source, SDL_Surface* dest, Sint16 x, Sint16 y) - Quick convenience call for SDL_BlitSurface. void SPG_DrawCenter(SDL_Surface* source, SDL_Surface* dest, Sint16 x, Sint16 y) - Blits an image centered on the given coordinates. 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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||