int AG_PixmapAddSurface (AG_Pixmap *pixmap, AG_Surface *surface)
int AG_PixmapAddSurfaceCopy (AG_Pixmap *pixmap, AG_Surface *surface)
int AG_PixmapAddSurfaceScaled (AG_Pixmap *pixmap, AG_Surface *surface, int width, int height)
int AG_PixmapAddSurfaceFromBMP (AG_Pixmap *pixmap, const char *path)
void AG_PixmapSetSurface (AG_Pixmap *pixmap, int surface_name)
void AG_PixmapReplaceSurface (AG_Pixmap *pixmap, int surface_name, AG_Surface *surfaceNew)
void AG_PixmapReplaceCurrentSurface (AG_Pixmap *pixmap, AG_Surface *surfaceNew)
void AG_PixmapReplaceSurfaceScaled (AG_Pixmap *pixmap, int surface_name, AG_Surface *surfaceNew, Uint width, Uint height)
void AG_PixmapReplaceCurrentSurfaceScaled (AG_Pixmap *pixmap, AG_Surface *surfaceNew, Uint width, Uint height)
void AG_PixmapUpdateSurface (AG_Pixmap *pixmap, int surface_name)
void AG_PixmapUpdateCurrentSurface (AG_Pixmap *pixmap)
void AG_PixmapSetCoords (AG_Pixmap *pixmap, int s, int t)
|
The
AG_Pixmap widget can map multiple surfaces and switch between them.
To add a new surface, use
AG_PixmapAddSurface(), AG_PixmapAddSurfaceCopy(), AG_PixmapAddSurfaceScaled() or
AG_PixmapAddSurfaceFromBMP().
AG_PixmapSetSurface() changes the currently visible surface to another surface that has been
previously mapped with
AG_PixmapAddSurface*(). To replace an existing mapped surface, use
AG_PixmapReplaceSurface() or
AG_PixmapReplaceSurfaceScaled() with the name of the surface.
If you need to modify the contents of a previously mapped surface, it is
necessary to call
AG_PixmapUpdateSurface() afterwards.
It has no effect in direct video mode, but it causes the texture to be
re-uploaded to the graphics hardware in OpenGL mode.
The
AG_PixmapReplaceCurrentSurface(), AG_PixmapReplaceCurrentSurfaceScaled() and
AG_PixmapUpdateCurrentSurface() variants operate on the currently selected (visible) surface.
The
AG_PixmapSetCoords() function changes the source coordinates of the active surface.
The default is [0,0].
|