diff options
| author | Manolo Gouy <Manolo> | 2016-03-19 16:48:33 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-19 16:48:33 +0000 |
| commit | 8711cf8be9035e5bc5e2e487012fa50d24e65748 (patch) | |
| tree | 08694c4ba7e3628eb00fb40d398d5f622fe6ad6e /FL/Fl_Image_Surface.H | |
| parent | f8bd5f304681258e4f9cf16784782fefa7e378f8 (diff) | |
(hopefully) Final driver-based rewriting of the Fl_Image_Surface class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11371 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Image_Surface.H')
| -rw-r--r-- | FL/Fl_Image_Surface.H | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index e88660a25..1e595b50d 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -70,14 +70,12 @@ class FL_EXPORT Fl_Image_Surface : public Fl_Widget_Surface { friend void fl_end_offscreen(void); friend void fl_delete_offscreen(Fl_Offscreen ctx); private: - class Helper; - Helper *platform_surface; + class Fl_Image_Surface_Driver *platform_surface; protected: void translate(int x, int y); void untranslate(); public: - Fl_Image_Surface(int w, int h, int high_res = 0); - Fl_Image_Surface(Fl_Offscreen off, int w, int h); + Fl_Image_Surface(int w, int h, int high_res = 0, Fl_Offscreen off = 0); ~Fl_Image_Surface(); void set_current(); void end_current(); @@ -90,6 +88,24 @@ public: Fl_Offscreen offscreen(); }; + +class Fl_Image_Surface_Driver : public Fl_Widget_Surface { + friend class Fl_Image_Surface; +protected: + int width; + int height; + Fl_Offscreen offscreen; + Fl_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {} + virtual ~Fl_Image_Surface_Driver() {} + virtual void set_current() {} + virtual void translate(int x, int y) {} + virtual void untranslate() {} + int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} + virtual Fl_RGB_Image *image() {return NULL;} + virtual void end_current() {} + static Fl_Image_Surface_Driver *newImageSurfaceDriver(int w, int h, int high_res, Fl_Offscreen off); +}; + #endif // Fl_Image_Surface_H // |
