|
Laxkit
0.0.7.1
|
Abstraction around images. More...

Public Member Functions | |
| LaxImage (const char *fname) | |
| virtual | ~LaxImage () |
| virtual int | imagetype ()=0 |
| virtual unsigned int | imagestate ()=0 |
| Return whether this is valid image, is whole image, etc. | |
| virtual void | doneForNow () |
| The file that the image is supposed to correspond to. | |
| virtual int | w ()=0 |
| Return the width of the actual image. | |
| virtual int | h ()=0 |
| Return the height of the actual image. | |
| virtual int | dataw ()=0 |
| Return the width of the image in memory (the actual or preview), or 0 if neither is in memory. | |
| virtual int | datah ()=0 |
| Return the height of the image in memory (the actual or preview), or 1 if neither is in memory. | |
| virtual void | clear ()=0 |
| Clear all data contained in this image. | |
| virtual unsigned char * | getImageBuffer ()=0 |
| virtual int | doneWithBuffer (unsigned char *buffer)=0 |
Public Member Functions inherited from Laxkit::anObject | |
| anObject () | |
| Set object_id=getUniqueNumber(). | |
| virtual | ~anObject () |
| Empty virtual destructor. | |
| virtual const char * | whattype () |
| Returns the type of anObject. | |
| virtual anObject * | duplicate (anObject *ref=NULL) |
| virtual int | inc_count () |
| Increment the data's count by 1. Returns count. | |
| virtual int | dec_count () |
| Decrement the count of the data, deleting if count is less than or equal to 0. | |
| virtual int | the_count () |
Public Attributes | |
| char | delpreview |
| 1 to unlink previewfile in the destructor, else 0. | |
| char * | filename |
| char * | previewfile |
| clock_t | lastaccesstime |
Public Attributes inherited from Laxkit::anObject | |
| int | suppress_debug |
| DeleteRefCountedFunc | deleteMe |
| Called when the count is decremented to 0. | |
| unsigned long | object_id |
| char * | object_idstr |
Additional Inherited Members | |
Protected Attributes inherited from Laxkit::anObject | |
| int | _count |
| The reference count of the object. | |
Abstraction around images.
The purpose of this class is to provide a relatively simple abstraction of images to make simple image loading easy, such as for icons. There is also a mechanism to allow a preview image to shadow the actual image. See previewfile for more.
If filename exists, but w()<=0, then the filename is invalid. Otherwise, the w() and h() refer to the actual width and height of the image. Same goes for previewfile, dataw(), and datah().