diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Bitmap.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Pixmap.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index d9c315152..185600c1e 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -121,7 +121,7 @@ int Fl_Bitmap::prepare(int XP, int YP, int WP, int HP, int &cx, int &cy, draw_empty(XP, YP); return 1; } - if (fl_graphics_driver->start_image(XP,YP,WP,HP,w(),h(),cx,cy,X,Y,W,H)) return 1; + if (fl_graphics_driver->start_image(this, XP,YP,WP,HP,cx,cy,X,Y,W,H)) return 1; if (!id_) id_ = fl_graphics_driver->cache(this, w(), h(), array); return 0; diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 95bae84a1..9fb840190 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -135,7 +135,7 @@ void Fl_Graphics_Driver::XDestroyRegion(Fl_Region r) } /** Helper function for image drawing by platform-specific graphics drivers */ -int Fl_Graphics_Driver::start_image(int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy, +int Fl_Graphics_Driver::start_image(Fl_Image *img, int XP, int YP, int WP, int HP, int &cx, int &cy, int &X, int &Y, int &W, int &H) { // account for current clip region (faster on Irix): @@ -143,10 +143,10 @@ int Fl_Graphics_Driver::start_image(int XP, int YP, int WP, int HP, int w, int h cx += X-XP; cy += Y-YP; // clip the box down to the size of image, quit if empty: if (cx < 0) {W += cx; X -= cx; cx = 0;} - if (cx+W > w) W = w-cx; + if (cx+W > img->w()) W = img->w()-cx; if (W <= 0) return 1; if (cy < 0) {H += cy; Y -= cy; cy = 0;} - if (cy+H > h) H = h-cy; + if (cy+H > img->h()) H = img->h()-cy; if (H <= 0) return 1; return 0; } diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 1fc8fa76b..d03a2caa5 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -61,7 +61,7 @@ int Fl_Pixmap::prepare(int XP, int YP, int WP, int HP, int &cx, int &cy, WP = w(); HP = h(); } - if ( fl_graphics_driver->start_image(XP,YP,WP,HP,w(),h(),cx,cy,X,Y,W,H) ) return 1; + if ( fl_graphics_driver->start_image(this, XP,YP,WP,HP,cx,cy,X,Y,W,H) ) return 1; if (!id_) { id_ = fl_graphics_driver->cache(this, w(), h(), data()); } diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index 391474183..a0ef3815d 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -490,7 +490,7 @@ void Fl_GDI_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, int Fl_Graphics_Driver::draw_empty(img, XP, YP); return; } - if (start_image(XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) { + if (start_image(img, XP, YP, WP, HP, cx, cy, X, Y, W, H)) { return; } if (!*Fl_Graphics_Driver::id(img)) *Fl_Graphics_Driver::id(img) = (fl_uintptr_t)build_id(img, (void**)(Fl_Graphics_Driver::mask(img))); diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx index ccead45b5..a3c0cf947 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx @@ -155,7 +155,7 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, Fl_Graphics_Driver::draw_empty(img, XP, YP); return; } - if (start_image(XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) { + if (start_image(img, XP, YP, WP, HP, cx, cy, X, Y, W, H)) { return; } if (!*Fl_Graphics_Driver::id(img)) { diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx index 3a046ef95..441d4b8df 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx @@ -710,7 +710,7 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, in Fl_Graphics_Driver::draw_empty(img, XP, YP); return; } - if (start_image(XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) { + if (start_image(img, XP, YP, WP, HP, cx, cy, X, Y, W, H)) { return; } if (!*Fl_Graphics_Driver::id(img)) { |
