Fix X11: test/checkers drawing artifacts when window is scaled (#1109)
This commit is contained in:
parent
8f987ce8bd
commit
82e0e859ee
@ -1477,7 +1477,9 @@ void Fl_Cairo_Graphics_Driver::restore_clip() {
|
||||
clip_->y = rect.y;
|
||||
clip_->w = rect.width;
|
||||
clip_->h = rect.height;
|
||||
cairo_set_antialias(cairo_, CAIRO_ANTIALIAS_NONE);
|
||||
cairo_clip(cairo_);
|
||||
cairo_set_antialias(cairo_, CAIRO_ANTIALIAS_DEFAULT );
|
||||
} else if (clip_) {
|
||||
clip_->w = -1;
|
||||
}
|
||||
|
@ -149,8 +149,8 @@ static void copy_region(struct wld_window *window, cairo_region_t *r) {
|
||||
cairo_region_get_rectangle(r, i, &rect);
|
||||
int left = rect.x * f;
|
||||
int top = rect.y * f;
|
||||
int width = rect.width * f;
|
||||
int height = rect.height * f;
|
||||
int width = ceil((rect.x + rect.width)*f) - left;
|
||||
int height = ceil((rect.y + rect.height)*f) - top;
|
||||
int offset = top * buffer->draw_buffer.stride + 4 * left;
|
||||
int W4 = 4 * width;
|
||||
for (int l = 0; l < height; l++) {
|
||||
|
Loading…
Reference in New Issue
Block a user