diff options
| author | Manolo Gouy <Manolo> | 2016-02-18 16:21:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-18 16:21:51 +0000 |
| commit | f33b45f1d30653fb5da4817089e38ff0a2413cfb (patch) | |
| tree | 9edc759690defa581b00b6ada80bb334f4ac5da8 /src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx | |
| parent | 6ce27012a9412c4964e0ae40c81ea92ff39a61d3 (diff) | |
Remove all uses of the fl_gc global variable. Towards a clean driver model.
fl_gc remains usable by the application as a hook into the system.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx index 976c6f5c3..de8729d74 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx @@ -41,9 +41,9 @@ void Fl_GDI_Graphics_Driver::arc(int x,int y,int w,int h,double a1,double a2) { int xb = x+w/2+int(w*cos(a2/180.0*M_PI)); int yb = y+h/2-int(h*sin(a2/180.0*M_PI)); if (fabs(a1 - a2) < 90) { - if (xa == xb && ya == yb) SetPixel(fl_gc, xa, ya, fl_RGB()); - else Arc(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb); - } else Arc(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb); + if (xa == xb && ya == yb) SetPixel(gc, xa, ya, fl_RGB()); + else Arc(gc, x, y, x+w, y+h, xa, ya, xb, yb); + } else Arc(gc, x, y, x+w, y+h, xa, ya, xb, yb); } void Fl_GDI_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) { @@ -53,14 +53,14 @@ void Fl_GDI_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) { int ya = y+h/2-int(h*sin(a1/180.0*M_PI)); int xb = x+w/2+int(w*cos(a2/180.0*M_PI)); int yb = y+h/2-int(h*sin(a2/180.0*M_PI)); - SelectObject(fl_gc, fl_brush()); + SelectObject(gc, fl_brush()); if (fabs(a1 - a2) < 90) { if (xa == xb && ya == yb) { - MoveToEx(fl_gc, x+w/2, y+h/2, 0L); - LineTo(fl_gc, xa, ya); - SetPixel(fl_gc, xa, ya, fl_RGB()); - } else Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb); - } else Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb); + MoveToEx(gc, x+w/2, y+h/2, 0L); + LineTo(gc, xa, ya); + SetPixel(gc, xa, ya, fl_RGB()); + } else Pie(gc, x, y, x+w, y+h, xa, ya, xb, yb); + } else Pie(gc, x, y, x+w, y+h, xa, ya, xb, yb); } #endif // FL_CFG_GFX_GDI_ARCI_CXX |
