diff options
| author | Manolo Gouy <Manolo> | 2016-02-19 12:40:24 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-19 12:40:24 +0000 |
| commit | 1b5e231c902ab198c577989db44946797ebd4893 (patch) | |
| tree | 211751e0eceda308df4e51d94511362f5e0b55f6 /src/drivers/Xlib | |
| parent | 6d766cc6814a9e7a04c0b147c7a3cbdc0817dfd4 (diff) | |
Rename Fl_Graphics_Driver::set_gc(void*) to gc(void*) and Fl_Graphics_Driver::get_gc() to gc().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 12 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h | 4 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx | 8 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx | 10 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx | 24 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx | 34 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 40 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx | 10 |
9 files changed, 73 insertions, 73 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx index 0a7950388..477ec91bf 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx @@ -31,7 +31,7 @@ const char *Fl_Xlib_Graphics_Driver::class_id = "Fl_Xlib_Graphics_Driver"; /* Reference to the current graphics context For back-compatibility only. The preferred procedure to get this pointer is - Fl_Surface_Device::surface()->driver()->get_gc(). + Fl_Surface_Device::surface()->driver()->gc(). */ GC fl_gc = 0; @@ -49,14 +49,14 @@ Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() return new Fl_Xlib_Graphics_Driver(); } -GC Fl_Xlib_Graphics_Driver::gc = NULL; +GC Fl_Xlib_Graphics_Driver::gc_ = NULL; Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) { - if (!gc) { + if (!gc_) { fl_open_display(); // the unique GC used by all X windows - gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0); - fl_gc = gc; + gc_ = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0); + fl_gc = gc_; } } @@ -66,7 +66,7 @@ char Fl_Xlib_Graphics_Driver::can_do_alpha_blending() { void Fl_Xlib_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { - XCopyArea(fl_display, pixmap, fl_window, gc, srcx, srcy, w, h, x, y); + XCopyArea(fl_display, pixmap, fl_window, gc_, srcx, srcy, w, h, x, y); } void Fl_Xlib_Graphics_Driver::copy_offscreen_with_alpha(int x, int y, int w, int h, diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h index f1e34cc38..19078c366 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.h @@ -34,13 +34,13 @@ */ class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Graphics_Driver { protected: - static GC gc; + static GC gc_; public: static const char *class_id; Fl_Xlib_Graphics_Driver(void); const char *class_name() {return class_id;}; virtual int has_feature(driver_feature mask) { return mask & NATIVE; } - virtual void *get_gc() { return gc; } + virtual void *gc() { return gc_; } char can_do_alpha_blending(); // --- bitmap stuff diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx index d7ee9a8e2..e667fd9ba 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx @@ -3,7 +3,7 @@ // // Arc (integer) drawing functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -26,13 +26,13 @@ void Fl_Xlib_Graphics_Driver::arc(int x,int y,int w,int h,double a1,double a2) { if (w <= 0 || h <= 0) return; - XDrawArc(fl_display, fl_window, gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); + XDrawArc(fl_display, fl_window, gc_, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); } void Fl_Xlib_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) { if (w <= 0 || h <= 0) return; - XDrawArc(fl_display, fl_window, gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); - XFillArc(fl_display, fl_window, gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); + XDrawArc(fl_display, fl_window, gc_, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); + XFillArc(fl_display, fl_window, gc_, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64)); } // diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx index 56c24bdef..53768e236 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx @@ -3,7 +3,7 @@ // // Color functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -115,15 +115,15 @@ void Fl_Xlib_Graphics_Driver::color(Fl_Color i) { fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8)); } else { Fl_Graphics_Driver::color(i); - if(!gc) return; // don't get a default gc if current window is not yet created/valid - XSetForeground(fl_display, gc, fl_xpixel(i)); + if(!gc_) return; // don't get a default gc if current window is not yet created/valid + XSetForeground(fl_display, gc_, fl_xpixel(i)); } } void Fl_Xlib_Graphics_Driver::color(uchar r,uchar g,uchar b) { Fl_Graphics_Driver::color( fl_rgb_color(r, g, b) ); - if(!gc) return; // don't get a default gc if current window is not yet created/valid - XSetForeground(fl_display, gc, fl_xpixel(r,g,b)); + if(!gc_) return; // don't get a default gc if current window is not yet created/valid + XSetForeground(fl_display, gc_, fl_xpixel(r,g,b)); } /** \addtogroup fl_attributes diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx index d275d7bba..cdf304894 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx @@ -3,7 +3,7 @@ // // X11 font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -642,14 +642,14 @@ double Fl_Xlib_Graphics_Driver::width(unsigned int c) { } void Fl_Xlib_Graphics_Driver::text_extents(const char *c, int n, int &dx, int &dy, int &W, int &H) { - if (font_gc != gc) { + if (font_gc != gc_) { if (!font_descriptor()) font(FL_HELVETICA, FL_NORMAL_SIZE); - font_gc = gc; - XSetFont(fl_display, gc, font_descriptor()->font->fid); + font_gc = gc_; + XSetFont(fl_display, gc_, font_descriptor()->font->fid); } int xx, yy, ww, hh; xx = yy = ww = hh = 0; - if (gc) XUtf8_measure_extents(fl_display, fl_window, font_descriptor()->font, gc, &xx, &yy, &ww, &hh, c, n); + if (gc_) XUtf8_measure_extents(fl_display, fl_window, font_descriptor()->font, gc_, &xx, &yy, &ww, &hh, c, n); W = ww; H = hh; dx = xx; dy = yy; // This is the safe but mostly wrong thing we used to do... @@ -660,12 +660,12 @@ void Fl_Xlib_Graphics_Driver::text_extents(const char *c, int n, int &dx, int &d } void Fl_Xlib_Graphics_Driver::draw(const char* c, int n, int x, int y) { - if (font_gc != gc) { + if (font_gc != gc_) { if (!font_descriptor()) this->font(FL_HELVETICA, FL_NORMAL_SIZE); - font_gc = gc; - XSetFont(fl_display, gc, font_descriptor()->font->fid); + font_gc = gc_; + XSetFont(fl_display, gc_, font_descriptor()->font->fid); } - if (gc) XUtf8DrawString(fl_display, fl_window, font_descriptor()->font, gc, x, y, c, n); + if (gc_) XUtf8DrawString(fl_display, fl_window, font_descriptor()->font, gc_, x, y, c, n); } void Fl_Xlib_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) { @@ -674,11 +674,11 @@ void Fl_Xlib_Graphics_Driver::draw(int angle, const char *str, int n, int x, int } void Fl_Xlib_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) { - if (font_gc != gc) { + if (font_gc != gc_) { if (!font_descriptor()) this->font(FL_HELVETICA, FL_NORMAL_SIZE); - font_gc = gc; + font_gc = gc_; } - if (gc) XUtf8DrawRtlString(fl_display, fl_window, font_descriptor()->font, gc, x, y, c, n); + if (gc_) XUtf8DrawRtlString(fl_display, fl_window, font_descriptor()->font, gc_, x, y, c, n); } #endif // FL_DOXYGEN // diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx index 7e41bcb47..a653ca54d 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx @@ -3,7 +3,7 @@ // // Image drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -568,7 +568,7 @@ void Fl_Xlib_Graphics_Driver::draw_image(const uchar* buf, int x, int y, int w, const bool alpha = !!(d & FL_IMAGE_WITH_ALPHA); d &= ~FL_IMAGE_WITH_ALPHA; - innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0,alpha,gc); + innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0,alpha,gc_); } void Fl_Xlib_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h,int d) { @@ -576,14 +576,14 @@ void Fl_Xlib_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, const bool alpha = !!(d & FL_IMAGE_WITH_ALPHA); d &= ~FL_IMAGE_WITH_ALPHA; - innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data,alpha,gc); + innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data,alpha,gc_); } void Fl_Xlib_Graphics_Driver::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){ - innards(buf,x,y,w,h,d,l,1,0,0,0,gc); + innards(buf,x,y,w,h,d,l,1,0,0,0,gc_); } void Fl_Xlib_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h,int d) { - innards(0,x,y,w,h,d,0,1,cb,data,0,gc); + innards(0,x,y,w,h,d,0,1,cb,data,0,gc_); } void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { @@ -593,7 +593,7 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { } else { uchar c[3]; c[0] = r; c[1] = g; c[2] = b; - innards(c,x,y,w,h,0,0,0,0,0,0,(GC)fl_graphics_driver->get_gc()); + innards(c,x,y,w,h,0,0,0,0,0,0,(GC)fl_graphics_driver->gc()); } } @@ -612,13 +612,13 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP return; } - XSetStipple(fl_display, gc, bm->id_); + XSetStipple(fl_display, gc_, bm->id_); int ox = X-cx; if (ox < 0) ox += bm->w(); int oy = Y-cy; if (oy < 0) oy += bm->h(); - XSetTSOrigin(fl_display, gc, ox, oy); - XSetFillStyle(fl_display, gc, FillStippled); - XFillRectangle(fl_display, fl_window, gc, X, Y, W, H); - XSetFillStyle(fl_display, gc, FillSolid); + XSetTSOrigin(fl_display, gc_, ox, oy); + XSetFillStyle(fl_display, gc_, FillStippled); + XFillRectangle(fl_display, fl_window, gc_, X, Y, W, H); + XSetFillStyle(fl_display, gc_, FillSolid); } @@ -729,10 +729,10 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, in cx += nx-X; X = nx; cy += ny-Y; Y = ny; // make X use the bitmap as a mask: - XSetClipMask(fl_display, gc, img->mask_); + XSetClipMask(fl_display, gc_, img->mask_); 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); + XSetClipOrigin(fl_display, gc_, X-cx, Y-cy); } if (img->d() == 4 && fl_can_do_alpha_blending()) @@ -742,7 +742,7 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, in if (img->mask_) { // put the old clip region back - XSetClipOrigin(fl_display, gc, 0, 0); + XSetClipOrigin(fl_display, gc_, 0, 0); fl_restore_clip(); } } else { @@ -778,8 +778,8 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H if (pxm->prepare(XP, YP, WP, HP, cx, cy, X, Y, W, H)) return; if (pxm->mask_) { // make X use the bitmap as a mask: - XSetClipMask(fl_display, gc, pxm->mask_); - XSetClipOrigin(fl_display, gc, X-cx, Y-cy); + XSetClipMask(fl_display, gc_, pxm->mask_); + XSetClipOrigin(fl_display, gc_, X-cx, Y-cy); if (clip_region()) { // At this point, XYWH is the bounding box of the intersection between // the current clip region and the (portion of the) pixmap we have to draw. @@ -805,7 +805,7 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H copy_offscreen(X, Y, W, H, pxm->id_, cx, cy); } // put the old clip region back - XSetClipOrigin(fl_display, gc, 0, 0); + XSetClipOrigin(fl_display, gc_, 0, 0); restore_clip(); } else copy_offscreen(X, Y, W, H, pxm->id_, cx, cy); diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx index 4aabe44b5..5763ea70f 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx @@ -71,10 +71,10 @@ void Fl_Xlib_Graphics_Driver::line_style(int style, int width, char* dashes) { } static int Cap[4] = {CapButt, CapButt, CapRound, CapProjecting}; static int Join[4] = {JoinMiter, JoinMiter, JoinRound, JoinBevel}; - XSetLineAttributes(fl_display, gc, width, + XSetLineAttributes(fl_display, gc_, width, ndashes ? LineOnOffDash : LineSolid, Cap[(style>>8)&3], Join[(style>>12)&3]); - if (ndashes) XSetDashes(fl_display, gc, 0, dashes, ndashes); + if (ndashes) XSetDashes(fl_display, gc_, 0, dashes, ndashes); } #endif // FL_CFG_GFX_XLIB_LINE_STYLE_CXX diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index 04dbb5b05..8fee467c3 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -3,7 +3,7 @@ // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2012 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -162,23 +162,23 @@ Fl_Region XRectangleRegion(int x, int y, int w, int h) { // --- line and polygon drawing with integer coordinates void Fl_Xlib_Graphics_Driver::point(int x, int y) { - XDrawPoint(fl_display, fl_window, gc, clip_x(x), clip_x(y)); + XDrawPoint(fl_display, fl_window, gc_, clip_x(x), clip_x(y)); } void Fl_Xlib_Graphics_Driver::rect(int x, int y, int w, int h) { if (w<=0 || h<=0) return; if (!clip_to_short(x, y, w, h)) - XDrawRectangle(fl_display, fl_window, gc, x, y, w-1, h-1); + XDrawRectangle(fl_display, fl_window, gc_, x, y, w-1, h-1); } void Fl_Xlib_Graphics_Driver::rectf(int x, int y, int w, int h) { if (w<=0 || h<=0) return; if (!clip_to_short(x, y, w, h)) - XFillRectangle(fl_display, fl_window, gc, x, y, w, h); + XFillRectangle(fl_display, fl_window, gc_, x, y, w, h); } void Fl_Xlib_Graphics_Driver::line(int x, int y, int x1, int y1) { - XDrawLine(fl_display, fl_window, gc, x, y, x1, y1); + XDrawLine(fl_display, fl_window, gc_, x, y, x1, y1); } void Fl_Xlib_Graphics_Driver::line(int x, int y, int x1, int y1, int x2, int y2) { @@ -186,18 +186,18 @@ void Fl_Xlib_Graphics_Driver::line(int x, int y, int x1, int y1, int x2, int y2) p[0].x = x; p[0].y = y; p[1].x = x1; p[1].y = y1; p[2].x = x2; p[2].y = y2; - XDrawLines(fl_display, fl_window, gc, p, 3, 0); + XDrawLines(fl_display, fl_window, gc_, p, 3, 0); } void Fl_Xlib_Graphics_Driver::xyline(int x, int y, int x1) { - XDrawLine(fl_display, fl_window, gc, clip_x(x), clip_x(y), clip_x(x1), clip_x(y)); + XDrawLine(fl_display, fl_window, gc_, clip_x(x), clip_x(y), clip_x(x1), clip_x(y)); } void Fl_Xlib_Graphics_Driver::xyline(int x, int y, int x1, int y2) { XPoint p[3]; p[0].x = clip_x(x); p[0].y = p[1].y = clip_x(y); p[1].x = p[2].x = clip_x(x1); p[2].y = clip_x(y2); - XDrawLines(fl_display, fl_window, gc, p, 3, 0); + XDrawLines(fl_display, fl_window, gc_, p, 3, 0); } void Fl_Xlib_Graphics_Driver::xyline(int x, int y, int x1, int y2, int x3) { @@ -205,18 +205,18 @@ void Fl_Xlib_Graphics_Driver::xyline(int x, int y, int x1, int y2, int x3) { p[0].x = clip_x(x); p[0].y = p[1].y = clip_x(y); p[1].x = p[2].x = clip_x(x1); p[2].y = p[3].y = clip_x(y2); p[3].x = clip_x(x3); - XDrawLines(fl_display, fl_window, gc, p, 4, 0); + XDrawLines(fl_display, fl_window, gc_, p, 4, 0); } void Fl_Xlib_Graphics_Driver::yxline(int x, int y, int y1) { - XDrawLine(fl_display, fl_window, gc, clip_x(x), clip_x(y), clip_x(x), clip_x(y1)); + XDrawLine(fl_display, fl_window, gc_, clip_x(x), clip_x(y), clip_x(x), clip_x(y1)); } void Fl_Xlib_Graphics_Driver::yxline(int x, int y, int y1, int x2) { XPoint p[3]; p[0].x = p[1].x = clip_x(x); p[0].y = clip_x(y); p[1].y = p[2].y = clip_x(y1); p[2].x = clip_x(x2); - XDrawLines(fl_display, fl_window, gc, p, 3, 0); + XDrawLines(fl_display, fl_window, gc_, p, 3, 0); } void Fl_Xlib_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3) { @@ -224,7 +224,7 @@ void Fl_Xlib_Graphics_Driver::yxline(int x, int y, int y1, int x2, int y3) { p[0].x = p[1].x = clip_x(x); p[0].y = clip_x(y); p[1].y = p[2].y = clip_x(y1); p[2].x = p[3].x = clip_x(x2); p[3].y = clip_x(y3); - XDrawLines(fl_display, fl_window, gc, p, 4, 0); + XDrawLines(fl_display, fl_window, gc_, p, 4, 0); } void Fl_Xlib_Graphics_Driver::loop(int x, int y, int x1, int y1, int x2, int y2) { @@ -233,7 +233,7 @@ void Fl_Xlib_Graphics_Driver::loop(int x, int y, int x1, int y1, int x2, int y2) p[1].x = x1; p[1].y = y1; p[2].x = x2; p[2].y = y2; p[3].x = x; p[3].y = y; - XDrawLines(fl_display, fl_window, gc, p, 4, 0); + XDrawLines(fl_display, fl_window, gc_, p, 4, 0); } void Fl_Xlib_Graphics_Driver::loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) { @@ -243,7 +243,7 @@ void Fl_Xlib_Graphics_Driver::loop(int x, int y, int x1, int y1, int x2, int y2, p[2].x = x2; p[2].y = y2; p[3].x = x3; p[3].y = y3; p[4].x = x; p[4].y = y; - XDrawLines(fl_display, fl_window, gc, p, 5, 0); + XDrawLines(fl_display, fl_window, gc_, p, 5, 0); } void Fl_Xlib_Graphics_Driver::polygon(int x, int y, int x1, int y1, int x2, int y2) { @@ -252,8 +252,8 @@ void Fl_Xlib_Graphics_Driver::polygon(int x, int y, int x1, int y1, int x2, int p[1].x = x1; p[1].y = y1; p[2].x = x2; p[2].y = y2; p[3].x = x; p[3].y = y; - XFillPolygon(fl_display, fl_window, gc, p, 3, Convex, 0); - XDrawLines(fl_display, fl_window, gc, p, 4, 0); + XFillPolygon(fl_display, fl_window, gc_, p, 3, Convex, 0); + XDrawLines(fl_display, fl_window, gc_, p, 4, 0); } void Fl_Xlib_Graphics_Driver::polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) { @@ -263,8 +263,8 @@ void Fl_Xlib_Graphics_Driver::polygon(int x, int y, int x1, int y1, int x2, int p[2].x = x2; p[2].y = y2; p[3].x = x3; p[3].y = y3; p[4].x = x; p[4].y = y; - XFillPolygon(fl_display, fl_window, gc, p, 4, Convex, 0); - XDrawLines(fl_display, fl_window, gc, p, 5, 0); + XFillPolygon(fl_display, fl_window, gc_, p, 4, Convex, 0); + XDrawLines(fl_display, fl_window, gc_, p, 5, 0); } // --- clipping @@ -340,8 +340,8 @@ void Fl_Xlib_Graphics_Driver::pop_clip() { void Fl_Xlib_Graphics_Driver::restore_clip() { fl_clip_state_number++; Fl_Region r = rstack[rstackptr]; - if (r) XSetRegion(fl_display, gc, r); - else XSetClipMask(fl_display, gc, 0); + if (r) XSetRegion(fl_display, gc_, r); + else XSetClipMask(fl_display, gc_, 0); } #endif // FL_CFG_GFX_XLIB_RECT_CXX diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx index b7d927873..7b7f20f1f 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx @@ -41,7 +41,7 @@ void Fl_Xlib_Graphics_Driver::vertex(double x,double y) { } void Fl_Xlib_Graphics_Driver::end_points() { - if (n>1) XDrawPoints(fl_display, fl_window, gc, p, n, 0); + if (n>1) XDrawPoints(fl_display, fl_window, gc_, p, n, 0); } void Fl_Xlib_Graphics_Driver::end_line() { @@ -49,7 +49,7 @@ void Fl_Xlib_Graphics_Driver::end_line() { end_points(); return; } - if (n>1) XDrawLines(fl_display, fl_window, gc, p, n, 0); + if (n>1) XDrawLines(fl_display, fl_window, gc_, p, n, 0); } void Fl_Xlib_Graphics_Driver::end_loop() { @@ -64,7 +64,7 @@ void Fl_Xlib_Graphics_Driver::end_polygon() { end_line(); return; } - if (n>2) XFillPolygon(fl_display, fl_window, gc, p, n, Convex, 0); + if (n>2) XFillPolygon(fl_display, fl_window, gc_, p, n, Convex, 0); } void Fl_Xlib_Graphics_Driver::begin_complex_polygon() { @@ -88,7 +88,7 @@ void Fl_Xlib_Graphics_Driver::end_complex_polygon() { end_line(); return; } - if (n>2) XFillPolygon(fl_display, fl_window, gc, p, n, 0, 0); + if (n>2) XFillPolygon(fl_display, fl_window, gc_, p, n, 0, 0); } // shortcut the closed circles so they use XDrawArc: @@ -106,7 +106,7 @@ void Fl_Xlib_Graphics_Driver::circle(double x, double y,double r) { int h = (int)rint(yt+ry)-lly; (what == POLYGON ? XFillArc : XDrawArc) - (fl_display, fl_window, gc, llx, lly, w, h, 0, 360*64); + (fl_display, fl_window, gc_, llx, lly, w, h, 0, 360*64); } #endif // FL_CFG_GFX_XLIB_VERTEX_CXX |
