Minor rewriting for more readable code.
This commit is contained in:
parent
4b2dbe3bb4
commit
a66fea7527
@ -252,9 +252,10 @@ int Fl_Cocoa_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h, i
|
||||
{
|
||||
CGImageRef img = CGImage_from_window_rect(src_x, src_y, src_w, src_h);
|
||||
if (img) {
|
||||
float s = Fl_Surface_Device::surface()->driver()->scale();
|
||||
((Fl_Quartz_Graphics_Driver*)fl_graphics_driver)->draw_CGImage(img,
|
||||
dest_x, dest_y, lround(s*src_w), lround(s*src_h), 0, 0, src_w, src_h);
|
||||
// the current surface is generally the display, but is an Fl_Image_Surface when scrolling an Fl_Overlay_Window
|
||||
Fl_Quartz_Graphics_Driver *qgd = (Fl_Quartz_Graphics_Driver*)Fl_Surface_Device::surface()->driver();
|
||||
float s = qgd->scale();
|
||||
qgd->draw_CGImage(img, dest_x, dest_y, lround(s*src_w), lround(s*src_h), 0, 0, src_w, src_h);
|
||||
CFRelease(img);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user