mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-15 23:18:26 +02:00
[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:
parent
21dab3c5e9
commit
6c7610067f
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue