diff options
Diffstat (limited to 'src/display/drawing-item.cpp')
| -rw-r--r-- | src/display/drawing-item.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 43db4f259..cc4673bc8 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -667,7 +667,7 @@ struct MaskLuminanceToAlpha { /** * Rasterize items. - * This method submits the drawing opeartions required to draw this item + * This method submits the drawing operations required to draw this item * to the supplied DrawingContext, restricting drawing the specified area. * * This method does some common tasks and calls the item-specific rendering @@ -699,6 +699,9 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag Geom::OptIntRect carea = Geom::intersect(area, _drawbox); if (!carea) return RENDER_OK; + // Device scale for HiDPI screens (typically 1 or 2) + int device_scale = dc.surface()->device_scale(); + switch(_antialias){ case 0: cairo_set_antialias(dc.raw(), CAIRO_ANTIALIAS_NONE); @@ -731,7 +734,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag Geom::OptIntRect cl = _drawing.cacheLimit(); cl.intersectWith(_drawbox); if (cl) { - _cache = new DrawingCache(*cl); + _cache = new DrawingCache(*cl, device_scale); } } } else { @@ -785,7 +788,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag iarea.intersectWith(_drawbox); } - DrawingSurface intermediate(*iarea); + DrawingSurface intermediate(*iarea, device_scale); DrawingContext ict(intermediate); unsigned render_result = RENDER_OK; @@ -832,7 +835,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag if (bg_root->_background_new) break; } if (bg_root) { - DrawingSurface bg(*iarea); + DrawingSurface bg(*iarea, device_scale); DrawingContext bgdc(bg); bg_root->render(bgdc, *iarea, flags | RENDER_FILTER_BACKGROUND, this); _filter->render(this, ict, &bgdc); |
