Fix HiDPI support under X11 to read/draw RGB image from/to display.
This commit is contained in:
parent
04ec829bfb
commit
ecdb386f3d
@ -796,8 +796,6 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
|
||||
sx *= s; sy *= s; sw *= s; sh *= s;
|
||||
}
|
||||
if (win && !allow_outside && int(s) != s) {
|
||||
ws = (w+1)*s-1;
|
||||
hs = (h+1)*s-1;
|
||||
if (Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
|
||||
if (Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
|
||||
}
|
||||
|
||||
@ -762,8 +762,10 @@ void Fl_Xlib_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP
|
||||
cache(rgb);
|
||||
}
|
||||
cache_size(rgb, W, H);
|
||||
int Wfull = rgb->w(), Hfull = rgb->h();
|
||||
cache_size(rgb, Wfull, Hfull);
|
||||
scale_and_render_pixmap( *Fl_Graphics_Driver::id(rgb), rgb->d(),
|
||||
rgb->data_w() / double(rgb->w()*scale()), rgb->data_h() / double(rgb->h()*scale()),
|
||||
rgb->data_w() / double(Wfull), rgb->data_h() / double(Hfull),
|
||||
cx*scale(), cy*scale(), (X + offset_x_)*scale(), (Y + offset_y_)*scale(), W, H);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user