@@ -33,10 +33,10 @@ public struct NSAffineTransformStruct {
3333
3434public class NSAffineTransform : NSObject , NSCopying , NSSecureCoding {
3535
36- public func encodeWithCoder( aCoder: NSCoder ) {
36+ public func encodeWithCoder( _ aCoder: NSCoder ) {
3737 NSUnimplemented ( )
3838 }
39- public func copyWithZone( zone: NSZone ) -> AnyObject {
39+ public func copyWithZone( _ zone: NSZone ) -> AnyObject {
4040 return NSAffineTransform ( transform: self )
4141 }
4242 // Necessary because `NSObject.copy()` returns `self`.
@@ -65,30 +65,30 @@ public class NSAffineTransform : NSObject, NSCopying, NSSecureCoding {
6565 }
6666
6767 // Translating
68- public func translateXBy( deltaX: CGFloat , yBy deltaY: CGFloat ) {
68+ public func translateXBy( _ deltaX: CGFloat , yBy deltaY: CGFloat ) {
6969 let translation = NSAffineTransformStruct . translation ( tX: deltaX, tY: deltaY)
7070
7171 transformStruct = translation. concat ( transformStruct)
7272 }
7373
7474 // Rotating
75- public func rotateByDegrees( angle: CGFloat ) {
75+ public func rotateByDegrees( _ angle: CGFloat ) {
7676 let rotation = NSAffineTransformStruct . rotation ( degrees: angle)
7777
7878 transformStruct = rotation. concat ( transformStruct)
7979 }
80- public func rotateByRadians( angle: CGFloat ) {
80+ public func rotateByRadians( _ angle: CGFloat ) {
8181 let rotation = NSAffineTransformStruct . rotation ( radians: angle)
8282
8383 transformStruct = rotation. concat ( transformStruct)
8484 }
8585
8686 // Scaling
87- public func scaleBy( scale: CGFloat ) {
87+ public func scaleBy( _ scale: CGFloat ) {
8888 scaleXBy ( scale, yBy: scale)
8989 }
9090
91- public func scaleXBy( scaleX: CGFloat , yBy scaleY: CGFloat ) {
91+ public func scaleXBy( _ scaleX: CGFloat , yBy scaleY: CGFloat ) {
9292 let scale = NSAffineTransformStruct . scale ( sX: scaleX, sY: scaleY)
9393
9494 transformStruct = scale. concat ( transformStruct)
@@ -105,19 +105,19 @@ public class NSAffineTransform : NSObject, NSCopying, NSSecureCoding {
105105 }
106106
107107 // Transforming with transform
108- public func appendTransform( transform: NSAffineTransform ) {
108+ public func appendTransform( _ transform: NSAffineTransform ) {
109109 transformStruct = transformStruct. concat ( transform. transformStruct)
110110 }
111- public func prependTransform( transform: NSAffineTransform ) {
111+ public func prependTransform( _ transform: NSAffineTransform ) {
112112 transformStruct = transform. transformStruct. concat ( transformStruct)
113113 }
114114
115115 // Transforming points and sizes
116- public func transformPoint( aPoint: NSPoint ) -> NSPoint {
116+ public func transformPoint( _ aPoint: NSPoint ) -> NSPoint {
117117 return transformStruct. applied ( toPoint: aPoint)
118118 }
119119
120- public func transformSize( aSize: NSSize ) -> NSSize {
120+ public func transformSize( _ aSize: NSSize ) -> NSSize {
121121 return transformStruct. applied ( toSize: aSize)
122122 }
123123
@@ -141,7 +141,7 @@ private extension NSAffineTransformStruct {
141141 [ 0 1 0 ]
142142 [ tX tY 1 ]
143143 */
144- static func translation( tX tX : CGFloat , tY: CGFloat ) -> NSAffineTransformStruct {
144+ static func translation( tX: CGFloat , tY: CGFloat ) -> NSAffineTransformStruct {
145145 return NSAffineTransformStruct (
146146 m11: CGFloat ( 1.0 ) , m12: CGFloat ( ) ,
147147 m21: CGFloat ( ) , m22: CGFloat ( 1.0 ) ,
@@ -157,7 +157,7 @@ private extension NSAffineTransformStruct {
157157 [ 0 sY 0 ]
158158 [ 0 0 1 ]
159159 */
160- static func scale( sX sX : CGFloat , sY: CGFloat ) -> NSAffineTransformStruct {
160+ static func scale( sX: CGFloat , sY: CGFloat ) -> NSAffineTransformStruct {
161161 return NSAffineTransformStruct (
162162 m11: sX, m12: CGFloat ( ) ,
163163 m21: CGFloat ( ) , m22: sY,
@@ -214,7 +214,7 @@ private extension NSAffineTransformStruct {
214214 = [ (m21_T*m11_M + m22_T*m21_M) (m21_T*m12_M + m22_T*m22_M) 0 ]
215215 [ (tX_T*m11_M + tY_T*m21_M + tX_M) (tX_T*m12_M + tY_T*m22_M + tY_M) 1 ]
216216 */
217- func concat( transformStruct: NSAffineTransformStruct ) -> NSAffineTransformStruct {
217+ func concat( _ transformStruct: NSAffineTransformStruct ) -> NSAffineTransformStruct {
218218 let ( t, m) = ( self , transformStruct)
219219
220220 return NSAffineTransformStruct (
0 commit comments