summaryrefslogtreecommitdiff
path: root/src/Fl_Shared_Image.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2011-01-24 17:04:22 +0000
committerMatthias Melcher <fltk@matthiasm.com>2011-01-24 17:04:22 +0000
commitfe25f19767f1cd2393c4d1796fb42d5aa82b194c (patch)
tree229437962da4fa67acf27bf171d6124f5631c34e /src/Fl_Shared_Image.cxx
parentf9363c16d0e6518ba82d05f1f7f415e9224a8e35 (diff)
Adding embedded documentation to Fluid if installed odcs are not found. Falls back to the internet if that does not exist either. Also, adds JPEG and PNG images to the Shared Image list if they were loaded from memory - see example use in fluid.cxx which loads and embedded html document containing an embedded PNG image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
-rw-r--r--src/Fl_Shared_Image.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 7c08eb846..da30d6ff7 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -374,11 +374,24 @@ Fl_Shared_Image* Fl_Shared_Image::find(const char *n, int W, int H) {
/**
- Gets a shared image, if it exists already ; it will return it.
- If it does not exist or if it exist but with other size,
- then the existing image is deleted and replaced
- by a new image from the n filename of the proper dimension.
- If n is not a valid image filename, then get() will return NULL.
+ \brief Find or load an image that can be shared by multiple widgets.
+
+ Gets a shared image, if it exists already ; it will return it.
+ If it does not exist or if it exist but with other size,
+ then the existing image is deleted and replaced
+ by a new image from the n filename of the proper dimension.
+ If n is not a valid image filename, then get() will return NULL.
+
+ Shared JPEG and PNG images can also be created from memory by using their
+ named memory access constructor.
+
+ \param n name of the image
+ \param W, H desired size
+
+ \see Fl_Shared_Image::find(const char *n, int W, int H)
+ \see Fl_Shared_Image::release()
+ \see Fl_JPEG_Image::Fl_JPEG_Image(const char *name, const unsigned char *data)
+ \see Fl_PNG_Image::Fl_PNG_Image (const char *name_png, const unsigned char *buffer, int maxsize)
*/
Fl_Shared_Image* Fl_Shared_Image::get(const char *n, int W, int H) {
Fl_Shared_Image *temp; // Image