summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-02-09 18:52:21 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-02-09 18:52:21 +0000
commit4272f32b6b90c3238e4252d8588e1843504e4c7f (patch)
treeb5c16ff583d9f08d02e21942e11156596f0414a1 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
parente02b3631b300141077870cd637793fde0760b97b (diff)
Fix typos for Linux from previous check-in.
- The previous check-in for OS X moved a few files and symbols around - Fixing for Linux what I broke in my previous commit - Fixing stuff for MSWindows next - CodeBlocks IDE file generation via CMake works git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index 479696b77..924ddec3e 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -45,11 +45,13 @@
////////////////////////////////////////////////////////////////
+#include "Fl_Xlib_Graphics_Driver.h"
# include <FL/Fl.H>
# include <FL/fl_draw.H>
# include <FL/x.H>
# include "../../Fl_XColor.H"
# include "../../flstring.h"
+#include <X11/Xregion.h>
static XImage xi; // template used to pass info to X
static int bytes_per_pixel;
@@ -693,9 +695,9 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
*dstptr++ = (srcb * srca + dstb * dsta) >> 8;
}
}
-
+
fl_draw_image(dst, X, Y, W, H, 3, 0);
-
+
delete[] dst;
}
@@ -814,16 +816,18 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H
else copy_offscreen(X, Y, W, H, pxm->id_, cx, cy);
}
+extern uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
+
fl_uintptr_t Fl_Xlib_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const char *const*data) {
Fl_Offscreen id;
- id = fl_create_offscreen(w(), h());
+ id = fl_create_offscreen(w, h);
fl_begin_offscreen(id);
uchar *bitmap = 0;
fl_mask_bitmap = &bitmap;
- fl_draw_pixmap(data(), 0, 0, FL_BLACK);
+ fl_draw_pixmap(data, 0, 0, FL_BLACK);
fl_mask_bitmap = 0;
if (bitmap) {
- img->mask_ = (fl_uintptr_t)fl_create_bitmask(w(), h(), bitmap);
+ img->mask_ = (fl_uintptr_t)fl_create_bitmask(w, h, bitmap);
delete[] bitmap;
}
fl_end_offscreen();