diff options
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index a72fe9d8b..ea24eba34 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -194,7 +194,7 @@ int Fl_Xlib_Graphics_Driver::clip_rect(int &x, int &y, int &w, int &h) { Fl_Region Fl_Xlib_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) { XRectangle R; - Fl_Region r = XCreateRegion(); // create an empty region + Region r = XCreateRegion(); // create an empty region if (clip_rect(x, y, w, h)) // outside valid coordinate space return r; // empty region R.x = x; R.y = y; R.width = w; R.height = h; @@ -203,7 +203,7 @@ Fl_Region Fl_Xlib_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) } void Fl_Xlib_Graphics_Driver::XDestroyRegion(Fl_Region r) { - ::XDestroyRegion(r); + ::XDestroyRegion((Region)r); } // --- line and polygon drawing @@ -312,12 +312,12 @@ void Fl_Xlib_Graphics_Driver::draw_clipped_line(int x1, int y1, int x2, int y2) // --- clipping void Fl_Xlib_Graphics_Driver::push_clip(int x, int y, int w, int h) { - Fl_Region r; + Region r; if (w > 0 && h > 0) { - r = XRectangleRegion(x, y, w, h); // does X coordinate clipping - Fl_Region current = rstack[rstackptr]; + r = (Region)XRectangleRegion(x, y, w, h); // does X coordinate clipping + Region current = (Region)rstack[rstackptr]; if (current) { - Fl_Region temp = XCreateRegion(); + Region temp = XCreateRegion(); XIntersectRegion(current, r, temp); XDestroyRegion(r); r = temp; @@ -337,7 +337,7 @@ int Fl_Xlib_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y W = H = 0; return 2; } - Fl_Region r = rstack[rstackptr]; + Region r = (Region)rstack[rstackptr]; if (!r) { // no clipping region if (X != x || Y != y || W != w || H != h) // pre-clipped return 1; // partially outside, region differs @@ -352,8 +352,8 @@ int Fl_Xlib_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y default: // partial: break; } - Fl_Region rr = XRectangleRegion(X, Y, W, H); - Fl_Region temp = XCreateRegion(); + Region rr = (Region)XRectangleRegion(X, Y, W, H); + Region temp = XCreateRegion(); XIntersectRegion(r, rr, temp); XRectangle rect; XClipBox(temp, &rect); @@ -365,7 +365,7 @@ int Fl_Xlib_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y int Fl_Xlib_Graphics_Driver::not_clipped(int x, int y, int w, int h) { if (x+w <= 0 || y+h <= 0) return 0; - Fl_Region r = rstack[rstackptr]; + Region r = (Region)rstack[rstackptr]; if (!r) return 1; // get rid of coordinates outside the 16-bit range the X calls take. if (clip_rect(x,y,w,h)) return 0; // clipped @@ -375,10 +375,10 @@ int Fl_Xlib_Graphics_Driver::not_clipped(int x, int y, int w, int h) { void Fl_Xlib_Graphics_Driver::restore_clip() { fl_clip_state_number++; if (gc_) { - Region r = rstack[rstackptr]; + Region r = (Region)rstack[rstackptr]; if (r) { - Region r2 = scale_clip(scale()); - XSetRegion(fl_display, gc_, rstack[rstackptr]); + Region r2 = (Region)scale_clip(scale()); + XSetRegion(fl_display, gc_, (Region)rstack[rstackptr]); unscale_clip(r2); } else XSetClipMask(fl_display, gc_, 0); |
