summaryrefslogtreecommitdiff
path: root/src/fl_scroll_area.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-13 14:48:13 +0000
committerManolo Gouy <Manolo>2016-02-13 14:48:13 +0000
commit4af616a7a27c3104938bf580502c762becd4417b (patch)
treecf3ab60ea9727c887ccf91d0caca32e5ba523f78 /src/fl_scroll_area.cxx
parentc95169ea492a0d1b101f42b3f46d4e8607b9dd4a (diff)
New member function Fl_Quartz_Graphics_Driver::draw_CGImage() used internally for all image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_scroll_area.cxx')
-rw-r--r--src/fl_scroll_area.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx
index 1afd1496a..4637dc561 100644
--- a/src/fl_scroll_area.cxx
+++ b/src/fl_scroll_area.cxx
@@ -24,6 +24,9 @@
#include <FL/Fl.H>
#include <FL/x.H>
#include <FL/fl_draw.H>
+#ifdef __APPLE__
+#include "drivers/Quartz/Fl_Quartz_Graphics_Driver.h"
+#endif
// scroll a rectangle and redraw the newly exposed portions:
/**
@@ -144,10 +147,7 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Graphics_Driver - platform scrolling
CGImageRef img = Fl_X::CGImage_from_window_rect(Fl_Window::current(), src_x, src_y, src_w, src_h);
if (img) {
- CGRect rect = CGRectMake(dest_x, dest_y, src_w, src_h);
- Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
- CGContextDrawImage(fl_gc, rect, img);
- Fl_X::q_end_image();
+ ((Fl_Quartz_Graphics_Driver*)fl_graphics_driver)->draw_CGImage(img,dest_x,dest_y,src_w,src_h,0,0,src_w,src_h);
CFRelease(img);
}
#elif defined(FL_PORTING)