diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-01-27 23:57:53 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-01-27 23:57:53 +0000 |
| commit | 48db7a07ef8e28dd4ab42b7bdc48669b503f354b (patch) | |
| tree | c13e3b9c2c7ae03a0c24cb7a5fe976b07eb414ba /src/Fl_Image.cxx | |
| parent | 411e73fe242f66b26e98d8689ceb6f9b686c19f9 (diff) | |
Modify Xlib driver code not to #include source files.
Adjusted CMake build, and with some additional temporary #ifdef's
the old Linux Makefile system works as well.
Defined FL_LIBRARY_CMAKE for now - will be removed later.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11067 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Image.cxx')
| -rw-r--r-- | src/Fl_Image.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index b4f6ddb9a..32b2de609 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -73,6 +73,26 @@ void Fl_Image::draw(int XP, int YP, int, int, int, int) { draw_empty(XP, YP); } + +#if defined(WIN32) || defined (USE_X11) +static int start(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy, + int &X, int &Y, int &W, int &H) +{ + // account for current clip region (faster on Irix): + 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; + if (W <= 0) return 1; + if (cy < 0) {H += cy; Y -= cy; cy = 0;} + if (cy+H > h) H = h-cy; + if (H <= 0) return 1; + return 0; +} +#endif // defined(WIN32) || defined (USE_X11) + + /** The protected method draw_empty() draws a box with an X in it. It can be used to draw any image that lacks image |
