summaryrefslogtreecommitdiff
path: root/render/render.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-13 08:43:57 -0500
committerDana Jansens <danakj@orodu.net>2008-02-14 15:10:14 -0500
commita2e3026d8a398a4d08c05610c3f652dd14fcdf45 (patch)
tree9197009c942de6d3efb51af0f7c79c886f8ca781 /render/render.h
parent35b36fc3771452cf980cb0a59aa05f3e2aa2aa67 (diff)
add a bunch of comments for images and image caches. and make the number of resized pictures saved in an image tunable per-icon cache.
Diffstat (limited to 'render/render.h')
-rw-r--r--render/render.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/render/render.h b/render/render.h
index e79727df..7053664d 100644
--- a/render/render.h
+++ b/render/render.h
@@ -234,11 +234,18 @@ struct _RrImagePic {
pictures */
struct _RrImage {
gint ref;
- struct _RrImageCache *cache;
+ RrImageCache *cache;
- struct _RrImagePic **original;
+ /*! An array of "originals", that is of RrPictures that have been added
+ to the image in various sizes, and that have not been resized. These
+ are explicitly added to the RrImage. */
+ RrImagePic **original;
gint n_original;
- struct _RrImagePic **resized;
+ /*! An array of "resized" pictures. When an "original" RrPicture
+ needs to be resized for drawing, it is saved in here so that it doesn't
+ need to be resized again. These are automatically added to the
+ RrImage. */
+ RrImagePic **resized;
gint n_resized;
};
@@ -317,7 +324,10 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
Pixmap pmap, Pixmap mask,
gint *w, gint *h, RrPixel32 **data);
-RrImageCache* RrImageCacheNew();
+/*! Create a new image cache for RrImages.
+ @param max_resized_saved The number of resized copies of an image to save
+*/
+RrImageCache* RrImageCacheNew(gint max_resized_saved);
void RrImageCacheRef(RrImageCache *self);
void RrImageCacheUnref(RrImageCache *self);