summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Image.H15
-rw-r--r--src/Fl_Image.cxx15
2 files changed, 22 insertions, 8 deletions
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index e7cec916b..690239b65 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -236,10 +236,17 @@ public:
virtual ~Fl_Image();
virtual Fl_Image *copy(int W, int H);
/**
- Creates a copy of the specified image.
- The image should be deleted (or in the case of Fl_Shared_Image, released)
- when you are done with it.
- */
+ Creates a copy of the specified image.
+ The image should be released when you are done with it.
+
+ Note: since FLTK 1.4.0 you can use Fl_Image::release() for
+ all types of images (i.e. all subclasses of Fl_Image) instead
+ of operator \em delete for Fl_Image's and release() for
+ Fl_Shared_Image's.
+
+ \see Fl_Image::release()
+ \see Fl_Image::copy(int w, int h)
+ */
Fl_Image *copy() { Fl_Image *img = copy(data_w(), data_h()); img->scale(w(), h(), 0, 1); return img;}
virtual void color_average(Fl_Color c, float i);
/**
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index 81a15416e..69c9727ab 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -76,10 +76,17 @@ void Fl_Image::draw_empty(int X, int Y) {
}
/**
-Creates a resized copy of the specified image.
-The image should be deleted (or in the case of Fl_Shared_Image, released)
-when you are done with it.
- \param W,H width and height of the returned copied image
+ Creates a resized copy of the specified image.
+ The image should be released when you are done with it.
+
+ Note: since FLTK 1.4.0 you can use Fl_Image::release() for
+ all types of images (i.e. all subclasses of Fl_Image) instead
+ of operator \em delete for Fl_Image's and release() for
+ Fl_Shared_Image's.
+
+ \see Fl_Image::release()
+
+ \param[in] W,H Requested width and height of the copied image
*/
Fl_Image *Fl_Image::copy(int W, int H) {
return new Fl_Image(W, H, d());