summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
index f1b159960..6fdc3461e 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
@@ -18,7 +18,7 @@
#include "../../config_lib.h"
-#include "Fl_Quartz_Graphics_Driver.h"
+#include "Fl_Quartz_Graphics_Driver.H"
/* Reference to the current CGContext
For back-compatibility only. The preferred procedure to get this reference is
@@ -70,6 +70,18 @@ void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscr
CGDataProviderRelease(src_bytes);
}
+void Fl_Graphics_Driver::add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H) {
+ CGRect arg = fl_cgrectmake_cocoa(X, Y, W, H);
+ int j; // don't add a rectangle totally inside the Fl_Region
+ for(j = 0; j < r->count; j++) {
+ if(CGRectContainsRect(r->rects[j], arg)) break;
+ }
+ if( j >= r->count) {
+ r->rects = (CGRect*)realloc(r->rects, (++(r->count)) * sizeof(CGRect));
+ r->rects[r->count - 1] = arg;
+ }
+}
+
//
// End of "$Id$".
//