aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMNSBezierPath+CGPath.m
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit/GTMNSBezierPath+CGPath.m')
-rw-r--r--AppKit/GTMNSBezierPath+CGPath.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/AppKit/GTMNSBezierPath+CGPath.m b/AppKit/GTMNSBezierPath+CGPath.m
index dd5c5f2..6b24a17 100644
--- a/AppKit/GTMNSBezierPath+CGPath.m
+++ b/AppKit/GTMNSBezierPath+CGPath.m
@@ -8,9 +8,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,7 +24,7 @@
// Extract a CGPathRef from a NSBezierPath.
//
-// Args:
+// Args:
//
// Returns:
// Converted CGPathRef.
@@ -32,25 +32,25 @@
- (CGPathRef)gtm_CGPath {
CGMutablePathRef thePath = CGPathCreateMutable();
if (!thePath) return nil;
-
+
NSInteger elementCount = [self elementCount];
-
+
// The maximum number of points is 3 for a NSCurveToBezierPathElement.
// (controlPoint1, controlPoint2, and endPoint)
NSPoint controlPoints[3];
-
+
for (NSInteger i = 0; i < elementCount; i++) {
switch ([self elementAtIndex:i associatedPoints:controlPoints]) {
case NSMoveToBezierPathElement:
- CGPathMoveToPoint(thePath, &CGAffineTransformIdentity,
+ CGPathMoveToPoint(thePath, &CGAffineTransformIdentity,
controlPoints[0].x, controlPoints[0].y);
break;
case NSLineToBezierPathElement:
- CGPathAddLineToPoint(thePath, &CGAffineTransformIdentity,
+ CGPathAddLineToPoint(thePath, &CGAffineTransformIdentity,
controlPoints[0].x, controlPoints[0].y);
break;
case NSCurveToBezierPathElement:
- CGPathAddCurveToPoint(thePath, &CGAffineTransformIdentity,
+ CGPathAddCurveToPoint(thePath, &CGAffineTransformIdentity,
controlPoints[0].x, controlPoints[0].y,
controlPoints[1].x, controlPoints[1].y,
controlPoints[2].x, controlPoints[2].y);