summaryrefslogtreecommitdiff
path: root/FL/Fl_Image_Surface.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-26 12:51:47 +0000
committerManolo Gouy <Manolo>2016-02-26 12:51:47 +0000
commit682f95079691dd9c9b0677cb66e727397f910e0d (patch)
tree9be00996ebe41d8d87fb1965ceff4f6f69b41310 /FL/Fl_Image_Surface.H
parente1f5f5f7ec75ed203fb14571e6bcbf6b0bd30771 (diff)
Create class Fl_Widget_Surface that supports draw(Fl_Widget *, int, int).
This simplifies the implementation of Fl_Copy_Surface and Fl_Image_Surface which now are made to derive from Fl_Widget_Surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Image_Surface.H')
-rw-r--r--FL/Fl_Image_Surface.H23
1 files changed, 4 insertions, 19 deletions
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H
index 878dffe22..b335b79a5 100644
--- a/FL/Fl_Image_Surface.H
+++ b/FL/Fl_Image_Surface.H
@@ -44,12 +44,11 @@
Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display
\endcode
*/
-class FL_EXPORT Fl_Image_Surface : public Fl_Surface_Device {
+class FL_EXPORT Fl_Image_Surface : public Fl_Widget_Surface {
private:
Fl_Offscreen offscreen;
int width;
int height;
- Fl_Paged_Device *helper;
#ifdef __APPLE__ // PORTME: Fl_Surface_Driver - platform image surface driver
#elif defined(WIN32)
HDC _sgc;
@@ -62,31 +61,17 @@ private:
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();
void set_current();
- void draw(Fl_Widget*, int delta_x = 0, int delta_y = 0);
Fl_RGB_Image *image();
- void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0);
Fl_Shared_Image *highres_image();
};
-#ifdef __APPLE__ // PORTME: Fl_Surface_Driver - platform surface driver
-/* Mac class to implement translate()/untranslate() for a flipped bitmap graphics context */
-class FL_EXPORT Fl_Quartz_Flipped_Surface_ : public Fl_Quartz_Surface_ {
-public:
- Fl_Quartz_Flipped_Surface_(int w, int h);
- void translate(int x, int y);
- void untranslate();
- virtual ~Fl_Quartz_Flipped_Surface_() {};
-};
-#elif defined(WIN32)
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: define a helper class for Fl_Image_Surface if needed"
-#else
-#endif
-
#endif // Fl_Image_Surface_H
//