00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef Fl_Image_Surface_H
00020 #define Fl_Image_Surface_H
00021
00022 #include <FL/Fl_Copy_Surface.H>
00023 #include <FL/Fl_Image.H>
00024 #include <FL/Fl_Shared_Image.H>
00025
00026
00047 class FL_EXPORT Fl_Image_Surface : public Fl_Surface_Device {
00048 private:
00049 void prepare_(int w, int h, int highres);
00050 Fl_Offscreen offscreen;
00051 int width;
00052 int height;
00053 Fl_Paged_Device *helper;
00054 #ifdef __APPLE__
00055 #elif defined(WIN32)
00056 HDC _sgc;
00057 Window _sw;
00058 Fl_Surface_Device *_ss;
00059 int _savedc;
00060 #else
00061 Fl_Surface_Device *previous;
00062 Window pre_window;
00063 GC gc;
00064 #endif
00065 public:
00066 static const char *class_id;
00067 const char *class_name() {return class_id;};
00068 #if FLTK_ABI_VERSION >= 10304 || defined(FL_DOXYGEN)
00069 Fl_Image_Surface(int w, int h, int highres = 0);
00070 #else
00071 Fl_Image_Surface(int w, int h, int highres);
00072 Fl_Image_Surface(int w, int h);
00073 #endif
00074 ~Fl_Image_Surface();
00075 void set_current();
00076 void draw(Fl_Widget*, int delta_x = 0, int delta_y = 0);
00077 void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0);
00078 Fl_RGB_Image *image();
00079 Fl_Shared_Image *highres_image();
00080 };
00081
00082 #ifdef __APPLE__
00083
00084 class FL_EXPORT Fl_Quartz_Flipped_Surface_ : public Fl_Quartz_Surface_ {
00085 public:
00086 static const char *class_id;
00087 const char *class_name() {return class_id;};
00088 Fl_Quartz_Flipped_Surface_(int w, int h);
00089 void translate(int x, int y);
00090 void untranslate();
00091 virtual ~Fl_Quartz_Flipped_Surface_() {};
00092 };
00093 #endif
00094
00095 #endif // Fl_Image_Surface_H
00096
00097
00098
00099