Transform Functions
Primitives
Polygon
Transform
Surface
Drawing
Dirty Rect
Palette
Control
Misc
Defines
Types
Extended

Arguments

Index
Credits

ReturnNameArguments
SDL_Surface*SPG_TransformSDL_Surface* src, Uint32 bgColor, float angle, float xscale, float yscale, Uint8 flags
SDL_RectSPG_TransformXSDL_Surface* src, SDL_Surface* dst, float angle, float xscale, float yscale, Uint16 destx, Uint16 desty, Uint16 pivotx, Uint16 pivoty, Uint8 flags
SDL_Surface*SPG_RotateSDL_Surface* src, float angle, Uint32 bgColor = 0
SDL_Surface*SPG_RotateAASDL_Surface* src, float angle, Uint32 bgColor = 0
SDL_Surface*SPG_ScaleSDL_Surface* src, float xscale, float yscale, Uint32 bgColor = 0
SDL_Surface*SPG_ScaleAASDL_Surface* src, float xscale, float yscale, Uint32 bgColor = 0


SDL_Surface*    SPG_Transform(SDL_Surface *src, Uint32 bgColor, float angle, float xscale, float yscale, Uint8 flags)
- Returns a new copy of the given surface after rotation and/or scaling.  Uses flags (see notes).

SDL_Rect        SPG_TransformX(SDL_Surface *src, SDL_Surface *dst, float angle, float xscale, float yscale, Uint16 px, Uint16 py, Uint16 qx, Uint16 qy, Uint8 flags)
- Draws the rotated/scaled source surface onto the dest surface.  You control the pivot point (p) and the destination point (q).  Uses flags (see notes).  Returns the bounding box of the result on the dest surface.

SDL_Surface*    SPG_Rotate(SDL_Surface *src, float angle, Uint32 bgColor = 0)
- Returns a new copy of the given surface after rotation.

SDL_Surface*    SPG_RotateAA(SDL_Surface *src, float angle, Uint32 bgColor = 0)
- Returns a new copy of the given surface after rotation.  Uses anti-aliasing for a smoother result.

SDL_Surface*    SPG_Scale(SDL_Surface *src, float xscale, float yscale, Uint32 bgColor = 0)
- Returns a new copy of the given surface after scaling.

SDL_Surface*    SPG_ScaleAA(SDL_Surface *src, float xscale, float yscale, Uint32 bgColor = 0)
- Returns a new copy of the given surface after scaling.  Uses anti-aliasing for a smoother result.




Notes:
The SPG_Transform functions use bit flags that can be OR'ed.  SPG_NONE is standard rendering, SPG_TAA enables anti-aliasing, SPG_TSAFE takes caution with weird bit-depths, SPG_TCOLORKEY enables colorkey transparency in SPG_Transform, and SPG_TTMAP uses a faster but uglier texture map renderer.  SPG_TSLOW uses a slower, but more accurate transform.  SPG_TBLEND performs alpha-blending and SPG_TSURFACE_ALPHA uses surface alpha on the transform (only for SPG_TransformX).

These functions respect the destination surface's clipping rect. (see SPG_ClipRect)
The surface will be automatically locked when necessary. (see SPG_Lock)


SPriG v1.0.0 Documentation by Jonathan Dearborn 2008