OSDN Git Service

不要な定数を削除
authormasakih <masakih@users.sourceforge.jp>
Tue, 12 Dec 2017 15:46:12 +0000 (00:46 +0900)
committermasakih <masakih@users.sourceforge.jp>
Tue, 12 Dec 2017 15:46:12 +0000 (00:46 +0900)
KCD/NSTextFieldExtension.swift

index 3d8d4a1..115d4b3 100644 (file)
@@ -12,14 +12,12 @@ extension NSTextField {
     
     func maskImage(middle1: CGFloat, middle2: CGFloat) -> CGImage {
         
-        let colorspace = CGColorSpaceCreateDeviceGray()
-        
         guard let maskContext = CGContext(data: nil,
                                           width: Int(bounds.width),
                                           height: Int(bounds.height),
                                           bitsPerComponent: 8,
                                           bytesPerRow: Int(bounds.width),
-                                          space: colorspace,
+                                          space: CGColorSpaceCreateDeviceGray(),
                                           bitmapInfo: 0) else {
                                             
                                             fatalError("Can not create bitmap context")