AG_Pixmap * AG_PixmapNew (AG_Widget *parent, Uint flags, Uint width, Uint height)
AG_Pixmap * AG_PixmapFromSurface (AG_Widget *parent, Uint flags, const AG_Surface *src)
AG_Pixmap * AG_PixmapFromSurfaceScaled (AG_Widget *parent, Uint flags, const AG_Surface *src, Uint width, Uint height)
AG_Pixmap * AG_PixmapFromSurfaceNODUP (AG_Widget *parent, Uint flags, AG_Surface *src)
AG_Pixmap * AG_PixmapFromFile (AG_Widget *parent, Uint flags, const char *path)
AG_Pixmap * AG_PixmapFromTexture (AG_Widget *parent, Uint flags, GLuint texture, int lod)
|
The
AG_PixmapNew() function creates a new
AG_Pixmap not linked to any surface.
The initial geometry of the widget is defined by the
width and
height parameters.
Acceptable
flags include:
AG_PIXMAP_RESCALE | Rescale image to fit widget size.
| AG_PIXMAP_HFILL | Expand horizontally in parent container.
| AG_PIXMAP_VFILL | Expand vertically in parent container.
| AG_PIXMAP_EXPAND | Shorthand for
AG_PIXMAP_HFILL AG_PIXMAP_VFILL|. |
The
AG_PixmapFromSurface() function creates a new
AG_Pixmap widget displaying a copy of the specified surface.
A pixel-format conversion is performed if necessary.
If the
src argument is NULL, an empty surface is displayed.
The
AG_PixmapFromSurfaceScaled() variant resizes the image to the given dimensions.
The
AG_PixmapFromSurfaceNODUP() variant uses the specified surface without making a copy.
The provided surface must remain valid as long as the widget exists, and
it must be in a format that can be displayed directly (such as
agSurfaceFmt).
The
AG_PixmapFromFile() function loads a surface from the image file at
path (image type is autodetected).
AG_PixmapFromTexture() may be used to display an active hardware texture.
lod specifies the level-of-detail of the texture (level 0 is the base image
level).
If OpenGL support is not available, an error is returned.
|