diff options
Diffstat (limited to 'src/drivers/GDI')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.H | 3 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H index fa5b517e3..eec35dea2 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H @@ -78,6 +78,9 @@ public: void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy); #endif void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); + void add_rectangle_to_region(Fl_Region r, int x, int y, int w, int h); + Fl_Region XRectangleRegion(int x, int y, int w, int h); + void XDestroyRegion(Fl_Region r); protected: void transformed_vertex0(int x, int y); void fixloop(); diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index f208b979f..47cc9383c 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -144,7 +144,7 @@ void Fl_Translated_GDI_Graphics_Driver::untranslate_all() { SetWindowOrgEx((HDC)gc(), origins[depth].x, origins[depth].y, NULL); } -void Fl_Graphics_Driver::add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H) { +void Fl_GDI_Graphics_Driver::add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H) { Fl_Region R = XRectangleRegion(X, Y, W, H); CombineRgn(r, r, R, RGN_OR); XDestroyRegion(R); @@ -166,7 +166,7 @@ void Fl_GDI_Graphics_Driver::fixloop() { // remove equal points from closed pat while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--; } -Fl_Region Fl_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) { +Fl_Region Fl_GDI_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) { if (Fl_Surface_Device::surface() == Fl_Display_Device::display_device()) return CreateRectRgn(x,y,x+w,y+h); // because rotation may apply, the rectangle becomes a polygon in device coords POINT pt[4] = { {x, y}, {x + w, y}, {x + w, y + h}, {x, y + h} }; @@ -174,16 +174,16 @@ Fl_Region Fl_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) { return CreatePolygonRgn(pt, 4, ALTERNATE); } -void Fl_Graphics_Driver::XDestroyRegion(Fl_Region r) { +void Fl_GDI_Graphics_Driver::XDestroyRegion(Fl_Region r) { DeleteObject(r); } -void Fl_Graphics_Driver::reset_spot() +void Fl_GDI_Graphics_Driver::reset_spot() { } -void Fl_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) +void Fl_GDI_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) { if (!win) return; Fl_Window* tw = win; |
