|
ubit
|
[Impl] image implementation (encapsulates system resources). More...
#include <uhardima.hpp>
Public Member Functions | |
| virtual int | read (const UStr &filename, const char *filetype=null, int max_w=0, int max_h=0) |
| reads and init an image from a file. More... | |
| virtual int | readFromData (const char **xpm_data, int max_w=0, int max_h=0) |
| reads and init an image from compiled XPM data. | |
| virtual void | setRaster (int width, int height, int alpha_hint)=0 |
| inits the raster with this size (previous data is destroyed if any). More... | |
| virtual UHardIma * | createScaledClone (float xscale, float yscale, UDisp *=0)=0 |
| creates a scaled copy of this image. | |
| virtual int | getWidth () const |
| virtual int | getHeight () const |
| virtual int | getBpp () const |
| virtual int | getTransparency () const |
| 0 (opaque), 1(bitmask) or >1(alpha channel). | |
| UDisp * | getDisp () const |
| virtual float | getScale () const =0 |
| virtual bool | isRealized () const =0 |
Protected Member Functions | |
| UHardIma & | operator= (const UHardIma &) |
Protected Attributes | |
| UDisp * | disp |
| int | width |
| int | height |
| unsigned char | bpp |
| unsigned char | transparency |
Friends | |
| class | UIma |
| class | UGraphCtxX11 |
| class | UGraphCtxGDK |
[Impl] image implementation (encapsulates system resources).
|
virtual |
reads and init an image from a file.
the filetype can be one of "gif" "jpeg" "xpm" or null in which case the type is deduced from the filename suffix. returns the UFileStat.
|
pure virtual |
inits the raster with this size (previous data is destroyed if any).
the pixel raster is created if width AND height are > 0. It is null otherwise. The previous pixel raster is always destroyed, if any.
'alpha_hint' specifies if the buffer has an alpha channel. it can be 0 (no alpha) or 1 (bitmask) for X11 and 8 (8 alpha bits) for GL.
1.8.12