diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-15 06:42:06 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-29 12:15:32 +0200 |
| commit | c720aae51515907ae82ee02df80bd084f291d4b1 (patch) | |
| tree | 7fbf3569f35966891df68490b047b30c9ec20bcd /src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx | |
| parent | 28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (diff) | |
Make hybrid Wayland/X11 platform.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx index 7f655e291..6795fb06b 100644 --- a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx @@ -29,8 +29,8 @@ Fl_GDI_Image_Surface_Driver::Fl_GDI_Image_Surface_Driver(int w, int h, int high_ h = int(h*d); } HDC gc = (HDC)Fl_Graphics_Driver::default_driver().gc(); - offscreen = off ? off : CreateCompatibleBitmap( (gc ? gc : fl_GetDC(0) ) , w, h); - if (!offscreen) offscreen = CreateCompatibleBitmap(fl_GetDC(0), w, h); + offscreen = off ? off : (Fl_Offscreen)CreateCompatibleBitmap( (gc ? gc : fl_GetDC(0) ) , w, h); + if (!offscreen) offscreen = (Fl_Offscreen)CreateCompatibleBitmap(fl_GetDC(0), w, h); driver(Fl_Graphics_Driver::newMainGraphicsDriver()); if (d != 1 && high_res) ((Fl_GDI_Graphics_Driver*)driver())->scale(d); origin.x = origin.y = 0; @@ -38,13 +38,13 @@ Fl_GDI_Image_Surface_Driver::Fl_GDI_Image_Surface_Driver(int w, int h, int high_ Fl_GDI_Image_Surface_Driver::~Fl_GDI_Image_Surface_Driver() { - if (offscreen && !external_offscreen) DeleteObject(offscreen); + if (offscreen && !external_offscreen) DeleteObject((HBITMAP)offscreen); delete driver(); } void Fl_GDI_Image_Surface_Driver::set_current() { - HDC gc = fl_makeDC(offscreen); + HDC gc = fl_makeDC((HBITMAP)offscreen); driver()->gc(gc); SetWindowOrgEx(gc, origin.x, origin.y, NULL); Fl_Surface_Device::set_current(); |
