Skip to content

Commit

Permalink
Context doesn't propagate its transform into CGPath.
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Oct 31, 2016
1 parent f066993 commit 53b4732
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Frameworks/CoreGraphics/CGContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void CGContextClosePath(CGContextRef context) {
void CGContextAddRect(CGContextRef context, CGRect rect) {
NOISY_RETURN_IF_NULL(context);

CGPathAddRect(context->Path(), &(context->CurrentGState().transform), rect);
CGPathAddRect(context->Path(), nullptr, rect);
}

/**
Expand All @@ -509,7 +509,7 @@ void CGContextAddRects(CGContextRef context, const CGRect* rects, unsigned count
void CGContextAddLineToPoint(CGContextRef context, CGFloat x, CGFloat y) {
NOISY_RETURN_IF_NULL(context);

CGPathAddLineToPoint(context->Path(), &(context->CurrentGState().transform), x, y);
CGPathAddLineToPoint(context->Path(), nullptr, x, y);
}

/**
Expand All @@ -518,7 +518,7 @@ void CGContextAddLineToPoint(CGContextRef context, CGFloat x, CGFloat y) {
void CGContextAddCurveToPoint(CGContextRef context, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y) {
NOISY_RETURN_IF_NULL(context);

CGPathAddCurveToPoint(context->Path(), &(context->CurrentGState().transform), cp1x, cp1y, cp2x, cp2y, x, y);
CGPathAddCurveToPoint(context->Path(), nullptr, cp1x, cp1y, cp2x, cp2y, x, y);
}

/**
Expand All @@ -527,7 +527,7 @@ void CGContextAddCurveToPoint(CGContextRef context, CGFloat cp1x, CGFloat cp1y,
void CGContextAddQuadCurveToPoint(CGContextRef context, CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y) {
NOISY_RETURN_IF_NULL(context);

CGPathAddQuadCurveToPoint(context->Path(), &(context->CurrentGState().transform), cpx, cpy, x, y);
CGPathAddQuadCurveToPoint(context->Path(), nullptr, cpx, cpy, x, y);
}

/**
Expand All @@ -536,7 +536,7 @@ void CGContextAddQuadCurveToPoint(CGContextRef context, CGFloat cpx, CGFloat cpy
void CGContextMoveToPoint(CGContextRef context, CGFloat x, CGFloat y) {
NOISY_RETURN_IF_NULL(context);

CGPathMoveToPoint(context->Path(), &(context->CurrentGState().transform), x, y);
CGPathMoveToPoint(context->Path(), nullptr, x, y);
}

/**
Expand All @@ -545,7 +545,7 @@ void CGContextMoveToPoint(CGContextRef context, CGFloat x, CGFloat y) {
void CGContextAddArc(CGContextRef context, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise) {
NOISY_RETURN_IF_NULL(context);

CGPathAddArc(context->Path(), &(context->CurrentGState().transform), x, y, radius, startAngle, endAngle, clockwise);
CGPathAddArc(context->Path(), nullptr, x, y, radius, startAngle, endAngle, clockwise);
}

/**
Expand All @@ -554,7 +554,7 @@ void CGContextAddArc(CGContextRef context, CGFloat x, CGFloat y, CGFloat radius,
void CGContextAddArcToPoint(CGContextRef context, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius) {
NOISY_RETURN_IF_NULL(context);

CGPathAddArcToPoint(context->Path(), &(context->CurrentGState().transform), x1, y1, x2, y2, radius);
CGPathAddArcToPoint(context->Path(), nullptr, x1, y1, x2, y2, radius);
}

/**
Expand All @@ -563,7 +563,7 @@ void CGContextAddArcToPoint(CGContextRef context, CGFloat x1, CGFloat y1, CGFloa
void CGContextAddEllipseInRect(CGContextRef context, CGRect rect) {
NOISY_RETURN_IF_NULL(context);

CGPathAddEllipseInRect(context->Path(), &(context->CurrentGState().transform), rect);
CGPathAddEllipseInRect(context->Path(), nullptr, rect);
}

/**
Expand All @@ -582,7 +582,7 @@ void CGContextAddPath(CGContextRef context, CGPathRef path) {
return;
}

CGPathAddPath(context->Path(), &(context->CurrentGState().transform), path);
CGPathAddPath(context->Path(), nullptr, path);
}

/**
Expand Down Expand Up @@ -646,7 +646,7 @@ void CGContextAddLines(CGContextRef context, const CGPoint* points, unsigned cou
return;
}

CGPathAddLines(context->Path(), &(context->CurrentGState().transform), points, count);
CGPathAddLines(context->Path(), nullptr, points, count);
}
#pragma endregion

Expand Down Expand Up @@ -686,7 +686,7 @@ CGPoint CGContextGetPathCurrentPoint(CGContextRef context) {
bool CGContextPathContainsPoint(CGContextRef context, CGPoint point, CGPathDrawingMode mode) {
NOISY_RETURN_IF_NULL(context, false);

return context->HasPath() && CGPathContainsPoint(context->Path(), &(context->CurrentGState().transform), point, (mode & kCGPathEOFill));
return context->HasPath() && CGPathContainsPoint(context->Path(), nullptr, point, (mode & kCGPathEOFill));
}
#pragma endregion

Expand Down

0 comments on commit 53b4732

Please sign in to comment.