summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-11-18 15:02:34 +0000
committerManolo Gouy <Manolo>2016-11-18 15:02:34 +0000
commit5cf12d94cbec1b2b421d8743cb39840d9c6fa737 (patch)
treed23ea2fafa7f3b76c1cd7f47094fc5b92b19f8a3 /src/drivers
parentd2378be96875a503e5bb7f8afa8580ef64c171fe (diff)
X11 platform: Fl_RGB_Image::mask_ is always 0, so remove code to process mask_ in Fl_Xlib_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12119 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index c36b4fb85..9cddae1d5 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -715,29 +715,10 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, in
}
}
if (*Fl_Graphics_Driver::id(img)) {
- if (*Fl_Graphics_Driver::mask(img)) {
- // I can't figure out how to combine a mask with existing region,
- // so cut the image down to a clipped rectangle:
- int nx, ny; fl_clip_box(X,Y,W,H,nx,ny,W,H);
- cx += nx-X; X = nx;
- cy += ny-Y; Y = ny;
- // make X use the bitmap as a mask:
- XSetClipMask(fl_display, gc_, *Fl_Graphics_Driver::mask(img));
- int ox = X-cx; if (ox < 0) ox += img->w();
- int oy = Y-cy; if (oy < 0) oy += img->h();
- XSetClipOrigin(fl_display, gc_, X-cx, Y-cy);
- }
-
if (img->d() == 4 && fl_can_do_alpha_blending())
copy_offscreen_with_alpha(X, Y, W, H, *Fl_Graphics_Driver::id(img), cx, cy);
else
copy_offscreen(X, Y, W, H, *Fl_Graphics_Driver::id(img), cx, cy);
-
- if (*Fl_Graphics_Driver::mask(img)) {
- // put the old clip region back
- XSetClipOrigin(fl_display, gc_, 0, 0);
- fl_restore_clip();
- }
} else {
// Composite image with alpha manually each time...
alpha_blend(img, X, Y, W, H, cx, cy);
@@ -750,11 +731,6 @@ void Fl_Xlib_Graphics_Driver::uncache(Fl_RGB_Image*, fl_uintptr_t &id_, fl_uintp
XFreePixmap(fl_display, (Fl_Offscreen)id_);
id_ = 0;
}
-
- if (mask_) {
- fl_delete_bitmask((Fl_Bitmask)mask_);
- mask_ = 0;
- }
}
fl_uintptr_t Fl_Xlib_Graphics_Driver::cache(Fl_Bitmap*, int w, int h, const uchar *array) {