diff options
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 175a48e7e..1230290c6 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -20,6 +20,7 @@ #include <config.h> #include "../../config_lib.h" #include "Fl_GDI_Graphics_Driver.h" +#include <FL/Fl.H> /* Reference to the current device context @@ -129,6 +130,18 @@ void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,H DeleteDC(new_gc); } +void Fl_Translated_GDI_Graphics_Driver::translate_all(int x, int y) { + GetWindowOrgEx((HDC)gc(), origins+depth); + SetWindowOrgEx((HDC)gc(), origins[depth].x - x, origins[depth].y - y, NULL); + if (depth < sizeof(origins)/sizeof(POINT)) depth++; + else Fl::warning("Fl_Copy_Surface: translate stack overflow!"); +} + +void Fl_Translated_GDI_Graphics_Driver::untranslate_all() { + if (depth > 0) depth--; + SetWindowOrgEx((HDC)gc(), origins[depth].x, origins[depth].y, NULL); +} + // // End of "$Id$". // |
