diff options
| author | Manolo Gouy <Manolo> | 2016-09-26 16:43:10 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-09-26 16:43:10 +0000 |
| commit | 5b5ba880f5c517eb2206c63b3def45ce60cc7136 (patch) | |
| tree | 000fce14837b2872444b00e53c5d130fd4605d4f /src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | |
| parent | 45e6be7316af7f2950f83b2c5cc28cf985315bf7 (diff) | |
MacOS platform: the printer's graphics driver should also call Fl_Graphics_Driver::newMainGraphicsDriver()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11982 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H index 216554f86..b46b94000 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H @@ -41,20 +41,23 @@ struct Fl_Fontdesc; */ class Fl_Quartz_Graphics_Driver : public Fl_Graphics_Driver { friend class Fl_Font_Descriptor; + friend class Fl_Cocoa_Printer_Driver; protected: CGContextRef gc_; int p_size; typedef struct { float x; float y; } XPOINT; XPOINT *p; bool high_resolution_; + driver_feature is_printer_; // protected constructor to ensure only derived classes are allocated Fl_Quartz_Graphics_Driver() : Fl_Graphics_Driver(), gc_(NULL), p_size(0), p(NULL) { high_resolution_ = false; + is_printer_ = (driver_feature)0; } public: static const int CoreText_threshold; // min Mac OS version for CoreText virtual ~Fl_Quartz_Graphics_Driver() { if (p) free(p); } - virtual int has_feature(driver_feature mask) { return mask & NATIVE; } + virtual int has_feature(driver_feature mask) { return mask & (NATIVE | is_printer_); } virtual void gc(void *ctxt) {if (ctxt != gc_) global_gc(); gc_ = (CGContextRef)ctxt; } virtual void *gc() {return gc_;} char can_do_alpha_blending(); |
