summaryrefslogtreecommitdiff
path: root/render/render.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-13 08:43:57 -0500
committerMikael Magnusson <mikachu@comhem.se>2008-02-14 11:44:51 +0100
commit0cd9986f87c0ad678fd112e5b8fc286105599228 (patch)
tree1e73ca9b4094fbe6f4e90d9216bafd830091752c /render/render.h
parent092c053e99c06335027934bdc9f0203d8969447f (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 5d1d1552..5f145083 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);