diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-04-17 14:45:25 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-04-17 14:45:25 +0000 |
| commit | 9ae4a99081237f94d47a480d41313dc65737bd98 (patch) | |
| tree | aefbe45f297640c084c2949ca3da2d936fef9a47 /src/drivers/Quartz | |
| parent | cc57af841a11ee314efca6a434ff14bed51706e4 (diff) | |
virtualized Fl_Graphics_Driver::global_gc(), a function that should probably not exeist.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H index d18484a10..39eaec6cb 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H @@ -123,6 +123,8 @@ protected: void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); int height(); int descent(); +protected: + virtual void global_gc(); }; extern float fl_quartz_line_width_; diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx index 6120af72d..90b4d5a8c 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx @@ -21,17 +21,6 @@ #include "Fl_Quartz_Graphics_Driver.H" #include <FL/x.H> -/* Reference to the current CGContext - For back-compatibility only. The preferred procedure to get this reference is - Fl_Surface_Device::surface()->driver()->gc(). - */ -CGContextRef fl_gc = 0; - -void Fl_Graphics_Driver::global_gc() -{ - fl_gc = (CGContextRef)gc(); -} - /* * By linking this module, the following static method will instantiate the * OS X Quartz Graphics driver as the main display driver. @@ -51,6 +40,17 @@ static void bmProviderRelease (void *src, const void *data, size_t size) { if(count == 1) free((void*)data); } +/* Reference to the current CGContext + For back-compatibility only. The preferred procedure to get this reference is + Fl_Surface_Device::surface()->driver()->gc(). + */ +CGContextRef fl_gc = 0; + +void Fl_Quartz_Graphics_Driver::global_gc() +{ + fl_gc = (CGContextRef)gc(); +} + void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscreen osrc,int srcx,int srcy) { CGContextRef src = (CGContextRef)osrc; void *data = CGBitmapContextGetData(src); |
