diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-04-10 13:14:04 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-04-10 13:14:04 +0200 |
| commit | 7a0bebb22fba0e2ed260b513421f6082a1c27a9e (patch) | |
| tree | 2dd0a5b06a4f404767527722bb3de2b08a3db05c /src/Fl_Image_Surface.cxx | |
| parent | 22a5dc3085836f17c0e895040b7dac4a7a0919c5 (diff) | |
New virtual member function bool Fl_Surface_Device::is_current()
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
| -rw-r--r-- | src/Fl_Image_Surface.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index fe38405a7..7dc079db8 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -54,6 +54,10 @@ void Fl_Image_Surface::set_current() { if (platform_surface) platform_surface->set_current(); } +bool Fl_Image_Surface::is_current() { + return surface() == platform_surface; +} + void Fl_Image_Surface::translate(int x, int y) { if (platform_surface) platform_surface->translate(x, y); } @@ -72,6 +76,10 @@ Fl_Offscreen Fl_Image_Surface::offscreen() { int Fl_Image_Surface::printable_rect(int *w, int *h) {return platform_surface->printable_rect(w, h);} +int Fl_Image_Surface_Driver::printable_rect(int *w, int *h) { + *w = width; *h = height; + return 0; +} /** Returns an image made of all drawings sent to the Fl_Image_Surface object. The returned object contains its own copy of the RGB data. |
