summaryrefslogtreecommitdiff
path: root/src/Fl_Image_Surface.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
-rw-r--r--src/Fl_Image_Surface.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
index e2870e578..1a5f5ec31 100644
--- a/src/Fl_Image_Surface.cxx
+++ b/src/Fl_Image_Surface.cxx
@@ -37,6 +37,7 @@
*/
Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL) {
platform_surface = Fl_Image_Surface_Driver::newImageSurfaceDriver(w, h, high_res, off);
+ platform_surface->image_surface_ = this;
if (platform_surface) driver(platform_surface->driver());
}
@@ -88,6 +89,10 @@ int Fl_Image_Surface_Driver::printable_rect(int *w, int *h) {
*w = width; *h = height;
return 0;
}
+
+Fl_Image_Surface *Fl_Image_Surface_Driver::as_image_surface() {
+ return image_surface_;
+}
/**
\}
\endcond
@@ -149,6 +154,12 @@ void Fl_Image_Surface::rescale() {
delete rgb;
}
+
+Fl_Image_Surface *Fl_Image_Surface::as_image_surface() {
+ return this;
+}
+
+
// implementation of the fl_XXX_offscreen() functions
static Fl_Image_Surface **offscreen_api_surface = NULL;