1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Disable anti-aliasing on background-color

Prefer crisp edges for the rectangle. I think this only
affects the PNG output, not PDF.
This commit is contained in:
Simon Sapin 2012-06-05 11:27:51 +02:00
parent 1624335b40
commit 182f1883c9

View File

@ -257,6 +257,9 @@ def draw_background(document, context, style, painting_area, positioning_area):
return
with context.stacked():
# Prefer crisp edges on background rectangles.
context.set_antialias(cairo.ANTIALIAS_NONE)
if painting_area:
context.rectangle(*painting_area)
context.clip()