summaryrefslogtreecommitdiff
path: root/src/Fl_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-11-05 06:00:52 +0000
committerManolo Gouy <Manolo>2016-11-05 06:00:52 +0000
commit6eea76e187bc1628fa61ca529aac0525c6a55576 (patch)
treef5ff552a157bd4b904b6b538bb9959627354d3f8 /src/Fl_Graphics_Driver.cxx
parent0c31411df9ef94e68c94462529d95e4fef092477 (diff)
Slightly improve the parameter list of member function int Fl_Graphics_Driver::start_image(...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12079 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
-rw-r--r--src/Fl_Graphics_Driver.cxx6
1 files changed, 3 insertions, 3 deletions
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;
}