Driver-based rewrite of the Fl_Copy_Surface class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2016-03-19 18:14:58 +00:00
parent 3dcc91d1f0
commit f936eb1a96
5 changed files with 135 additions and 61 deletions
+19 -2
View File
@@ -48,8 +48,7 @@
*/
class FL_EXPORT Fl_Copy_Surface : public Fl_Widget_Surface {
private:
class Helper;
Helper *platform_surface;
class Fl_Copy_Surface_Driver *platform_surface;
protected:
void translate(int x, int y);
void untranslate();
@@ -66,6 +65,24 @@ public:
int printable_rect(int *w, int *h);
};
class Fl_Copy_Surface_Driver : public Fl_Widget_Surface {
friend class Fl_Copy_Surface;
protected:
int width;
int height;
Fl_Copy_Surface_Driver(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {}
virtual ~Fl_Copy_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_Copy_Surface_Driver *newCopySurfaceDriver(int w, int h);
};
#endif // Fl_Copy_Surface_H
//