mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-15 06:50:31 +01:00
quartz: Stroke without ctm_inverse multiplication
If the CTM is not changed before creating the path, no multiplication needs to be made between points and the inverse of the CTM.
This commit is contained in:
parent
514d366cde
commit
3b2ceff050
1 changed files with 5 additions and 5 deletions
|
|
@ -2145,13 +2145,10 @@ _cairo_quartz_surface_stroke_cg (void *abstract_surface,
|
|||
|
||||
action = _cairo_quartz_setup_source (surface, source);
|
||||
|
||||
_cairo_quartz_cairo_matrix_to_quartz (ctm, &strokeTransform);
|
||||
CGContextConcatCTM (surface->cgContext, strokeTransform);
|
||||
|
||||
CGContextBeginPath (surface->cgContext);
|
||||
|
||||
stroke.cgContext = surface->cgContext;
|
||||
stroke.ctm_inverse = ctm_inverse;
|
||||
stroke.ctm_inverse = NULL;
|
||||
rv = _cairo_quartz_cairo_path_to_quartz_context (path, &stroke);
|
||||
if (rv)
|
||||
goto BAIL;
|
||||
|
|
@ -2159,6 +2156,9 @@ _cairo_quartz_surface_stroke_cg (void *abstract_surface,
|
|||
if (!_cairo_operator_bounded_by_mask (op) && CGContextCopyPathPtr)
|
||||
path_for_unbounded = CGContextCopyPathPtr (surface->cgContext);
|
||||
|
||||
_cairo_quartz_cairo_matrix_to_quartz (ctm, &strokeTransform);
|
||||
CGContextConcatCTM (surface->cgContext, strokeTransform);
|
||||
|
||||
if (action == DO_SOLID || action == DO_PATTERN) {
|
||||
CGContextStrokePath (surface->cgContext);
|
||||
} else if (action == DO_IMAGE || action == DO_TILED_IMAGE) {
|
||||
|
|
@ -2186,12 +2186,12 @@ _cairo_quartz_surface_stroke_cg (void *abstract_surface,
|
|||
|
||||
if (path_for_unbounded) {
|
||||
CGContextSaveGState (surface->cgContext);
|
||||
CGContextConcatCTM (surface->cgContext, strokeTransform);
|
||||
|
||||
CGContextBeginPath (surface->cgContext);
|
||||
CGContextAddPath (surface->cgContext, path_for_unbounded);
|
||||
CGPathRelease (path_for_unbounded);
|
||||
|
||||
CGContextConcatCTM (surface->cgContext, strokeTransform);
|
||||
CGContextReplacePathWithStrokedPath (surface->cgContext);
|
||||
|
||||
CGContextAddRect (surface->cgContext, CGContextGetClipBoundingBox (surface->cgContext));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue