summaryrefslogtreecommitdiff
path: root/src/Fl_Image.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
commit45bb73a9bf4692c68294be12a2e25a39ca3a307b (patch)
tree97b86255a274ec6415738788c180d5528f0948d1 /src/Fl_Image.cxx
parent8b880adac62b6724c36405b173286362c386c227 (diff)
Commited WIN32 patches from Bill Spitzak and Gustavo Hime.
git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Image.cxx')
-rw-r--r--src/Fl_Image.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index 1aac860d4..7ab4bfb86 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -9,7 +9,10 @@
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Image.H>
-void Fl_Image::draw(int X, int Y, int W, int H, int cx,int cy) {
+void Fl_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
+ // account for current clip region (faster on Irix):
+ int X,Y,W,H; fl_clip_box(XP,YP,WP,HP,X,Y,W,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;