mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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:
+19
-2
@@ -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
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user