summaryrefslogtreecommitdiff
path: root/FL/Fl_Image_Surface.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-27 13:52:27 +0000
committerManolo Gouy <Manolo>2016-02-27 13:52:27 +0000
commit0b406baa0f05d8b829d2c35b10c8450e7628be53 (patch)
tree62d91890f7194e00ea9f40e89f640c7c013c7b45 /FL/Fl_Image_Surface.H
parent5d24872dc40e1047cea6337d8823718ac2acd575 (diff)
Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Image_Surface.H')
-rw-r--r--FL/Fl_Image_Surface.H23
1 files changed, 17 insertions, 6 deletions
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H
index b335b79a5..3a62fb081 100644
--- a/FL/Fl_Image_Surface.H
+++ b/FL/Fl_Image_Surface.H
@@ -45,27 +45,38 @@
\endcode
*/
class FL_EXPORT Fl_Image_Surface : public Fl_Widget_Surface {
+ friend Fl_Offscreen fl_create_offscreen(int, int);
+#ifndef FL_DOXYGEN
+ friend Fl_Offscreen fl_create_offscreen_with_alpha(int, int);//X11 only
+#endif
+ friend void fl_begin_offscreen(Fl_Offscreen);
+ friend void fl_end_offscreen(void);
+ friend void fl_delete_offscreen(Fl_Offscreen);
private:
Fl_Offscreen offscreen;
int width;
int height;
+ Fl_Surface_Device *previous;
+ Window pre_window;
+#if defined(__APPLE__)
+ int was_high;
+#endif
+ Fl_Image_Surface(Fl_Offscreen pixmap, int w, int h); // for X11 only
+ void initialize_(Fl_Offscreen pixmap, int w, int h, int high_res);
+ void end_current();
#ifdef __APPLE__ // PORTME: Fl_Surface_Driver - platform image surface driver
#elif defined(WIN32)
- HDC _sgc;
- Window _sw;
- Fl_Surface_Device *_ss;
+ HDC _sgc;
int _savedc;
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: define variables to hold image data for Fl_Image_Surface"
#else
- Fl_Surface_Device *previous;
- Window pre_window;
#endif
protected:
void translate(int x, int y);
void untranslate();
public:
- Fl_Image_Surface(int w, int h, int highres = 0);
+ Fl_Image_Surface(int w, int h, int high_res = 0);
~Fl_Image_Surface();
void set_current();
Fl_RGB_Image *image();