[quartz] handle antialiasing correctly in stroke() and clip()

A CoreGraphics bug was fixed so strokes are no longer incorrectly
drawn with antialiasing disabled; we no longer have to ignore
antialiasing for stroke().  Also, antialiasing was not being
correctly set for clip().  This fixes both issues.
This commit is contained in:
Vladimir Vukicevic 2008-03-07 15:35:31 -08:00 committed by Vladimir Vukicevic
parent 21dab3c5e9
commit 6c7610067f

View file

@ -1390,9 +1390,10 @@ _cairo_quartz_surface_stroke (void *abstract_surface,
CGContextSaveGState (surface->cgContext);
// Turning antialiasing off causes misrendering with
// single-pixel lines (e.g. 20,10.5 -> 21,10.5 end up being rendered as 2 pixels)
//CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
// Turning antialiasing off used to cause misrendering with
// single-pixel lines (e.g. 20,10.5 -> 21,10.5 end up being rendered as 2 pixels).
// That's been since fixed in at least 10.5, and in the latest 10.4 dot releases.
CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
CGContextSetLineWidth (surface->cgContext, style->line_width);
CGContextSetLineCap (surface->cgContext, _cairo_quartz_cairo_line_cap_to_quartz (style->line_cap));
CGContextSetLineJoin (surface->cgContext, _cairo_quartz_cairo_line_join_to_quartz (style->line_join));
@ -1798,6 +1799,8 @@ _cairo_quartz_surface_intersect_clip_path (void *abstract_surface,
stroke.cgContext = surface->cgContext;
stroke.ctm_inverse = NULL;
CGContextSetShouldAntialias (surface->cgContext, (antialias != CAIRO_ANTIALIAS_NONE));
/* path must not be empty. */
CGContextMoveToPoint (surface->cgContext, 0, 0);
status = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);