summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Bitmap.cxx2
-rw-r--r--src/Fl_Graphics_Driver.cxx2
-rw-r--r--src/Fl_Image.cxx13
-rw-r--r--src/Fl_Pixmap.cxx2
-rw-r--r--src/Fl_SVG_Image.cxx2
5 files changed, 12 insertions, 9 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index 9baacf321..16e0ae5e8 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -232,7 +232,7 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
}
-int Fl_Bitmap::draw_scaled_(int X, int Y, int W, int H) {
+int Fl_Bitmap::draw_scaled(int X, int Y, int W, int H) {
return (W <= w() && H <= h()) ? fl_graphics_driver->draw_scaled(this, X, Y, W, H) : 0;
}
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index e802952c9..0ede40ad5 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -196,7 +196,7 @@ void Fl_Graphics_Driver::draw(Fl_Shared_Image *shared, int X, int Y) {
shared->image_->draw(X, Y, shared->w(), shared->h(), 0, 0);
return;
}
- if ( shared->image_->draw_scaled_(X, Y, shared->w(), shared->h()) ) return;
+ if ( shared->image_->draw_scaled(X, Y, shared->w(), shared->h()) ) return;
if (shared->scaled_image_ && (shared->scaled_image_->w() != shared->w() || shared->scaled_image_->h() != shared->h())) {
delete shared->scaled_image_;
shared->scaled_image_ = NULL;
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index a622f7d9e..efe980cb8 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -578,14 +578,17 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
m->label(_FL_IMAGE_LABEL, (const char*)this);
}
-int Fl_RGB_Image::draw_scaled_(int X, int Y, int W, int H) {
+int Fl_RGB_Image::draw_scaled(int X, int Y, int W, int H) {
return fl_graphics_driver->draw_scaled(this, X, Y, W, H);
}
-// Draws the image scaled to W and H, and returns 1,
-// or returns 0 if scaled drawing is not implemented for this image.
-// Image classes can re-implement this function for specific image types.
-int Fl_Image::draw_scaled_(int X, int Y, int W, int H) {
+/** Attempts to draw the image to the current drawing surface rescaled to a given width and height.
+ This virtual member function is mostly intended for use by the FLTK library.
+ \param X,Y position of the image's top-left
+ \param W,H width and height for the drawn image
+ \return 0 if scaled drawing is not implemented for this image, non-zero if it is implemented.
+ */
+int Fl_Image::draw_scaled(int X, int Y, int W, int H) {
return 0;
}
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index 55658249a..cebbda901 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -394,7 +394,7 @@ void Fl_Pixmap::desaturate() {
}
}
-int Fl_Pixmap::draw_scaled_(int X, int Y, int W, int H) {
+int Fl_Pixmap::draw_scaled(int X, int Y, int W, int H) {
return (W <= w() && H <= h()) ? fl_graphics_driver->draw_scaled(this, X, Y, W, H) : 0;
}
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx
index 7723f56af..cd85aa146 100644
--- a/src/Fl_SVG_Image.cxx
+++ b/src/Fl_SVG_Image.cxx
@@ -205,7 +205,7 @@ void Fl_SVG_Image::color_average(Fl_Color c, float i) {
}
-int Fl_SVG_Image::draw_scaled_(int X, int Y, int W, int H) {
+int Fl_SVG_Image::draw_scaled(int X, int Y, int W, int H) {
w(W);
h(H);
draw(X, Y, W, H, 0, 0);