From 0686da38cf8a2baf0dd9230fad3ffc7e9e36de97 Mon Sep 17 00:00:00 2001 From: Daniele Bogo Date: Mon, 3 Sep 2018 15:24:53 +0100 Subject: [PATCH 1/8] Add pin icon --- Gridicons/Gridicons/Gridicons.swift | 3 ++ Gridicons/Gridicons/GridiconsGenerated.swift | 49 ++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/Gridicons/Gridicons/Gridicons.swift b/Gridicons/Gridicons/Gridicons.swift index c4f94f7..e8d89b5 100644 --- a/Gridicons/Gridicons/Gridicons.swift +++ b/Gridicons/Gridicons/Gridicons.swift @@ -60,6 +60,7 @@ public enum GridiconType: Int { case plugins case play case plans + case pin case phone case pencil case pause @@ -337,6 +338,8 @@ public final class Gridicon: NSObject { return GridiconsGenerated.imageOfGridiconsplay(size: size) case .plans: return GridiconsGenerated.imageOfGridiconsplans(size: size) + case .pin: + return GridiconsGenerated.imageOfGridiconspin(size: size) case .phone: return GridiconsGenerated.imageOfGridiconsphone(size: size) case .pencil: diff --git a/Gridicons/Gridicons/GridiconsGenerated.swift b/Gridicons/Gridicons/GridiconsGenerated.swift index fabd019..92f90ab 100644 --- a/Gridicons/Gridicons/GridiconsGenerated.swift +++ b/Gridicons/Gridicons/GridiconsGenerated.swift @@ -12370,6 +12370,44 @@ class GridiconsGenerated: NSObject { context.restoreGState() } + class func drawGridiconspin(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 18, height: 18), resizing: ResizingBehavior = .aspectFit) { + + let context = UIGraphicsGetCurrentContext()! + + /// Resize to Target Frame + context.saveGState() + let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 18, height: 18), target: targetFrame) + context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY) + context.scaleBy(x: resizedFrame.width / 18, y: resizedFrame.height / 18) + + /// gridicons-pin + let bezierPath = UIBezierPath() + bezierPath.move(to: CGPoint(x: 5.55, y: 7.98)) + bezierPath.addLine(to: CGPoint(x: 9.98, y: 3.58)) + bezierPath.addCurve(to: CGPoint(x: 9.98, y: 0.72), controlPoint1: CGPoint(x: 9.15, y: 2.76), controlPoint2: CGPoint(x: 9.15, y: 1.53)) + bezierPath.addLine(to: CGPoint(x: 10.7, y: 0)) + bezierPath.addLine(to: CGPoint(x: 18, y: 7.26)) + bezierPath.addLine(to: CGPoint(x: 17.28, y: 7.87)) + bezierPath.addCurve(to: CGPoint(x: 14.4, y: 7.87), controlPoint1: CGPoint(x: 16.46, y: 8.69), controlPoint2: CGPoint(x: 15.22, y: 8.69)) + bezierPath.addLine(to: CGPoint(x: 9.98, y: 12.27)) + bezierPath.addCurve(to: CGPoint(x: 9.36, y: 17.28), controlPoint1: CGPoint(x: 10.9, y: 13.81), controlPoint2: CGPoint(x: 10.7, y: 15.85)) + bezierPath.addLine(to: CGPoint(x: 5.76, y: 13.7)) + bezierPath.addLine(to: CGPoint(x: 2.88, y: 16.57)) + bezierPath.addCurve(to: CGPoint(x: 0, y: 18), controlPoint1: CGPoint(x: 1.85, y: 17.39), controlPoint2: CGPoint(x: 0.82, y: 17.8)) + bezierPath.addCurve(to: CGPoint(x: 1.44, y: 15.14), controlPoint1: CGPoint(x: 0.21, y: 17.08), controlPoint2: CGPoint(x: 0.72, y: 16.16)) + bezierPath.addLine(to: CGPoint(x: 4.32, y: 12.27)) + bezierPath.addLine(to: CGPoint(x: 0.72, y: 8.69)) + bezierPath.addCurve(to: CGPoint(x: 5.55, y: 7.98), controlPoint1: CGPoint(x: 1.85, y: 7.26), controlPoint2: CGPoint(x: 3.91, y: 7.06)) + bezierPath.close() + context.saveGState() + bezierPath.usesEvenOddFillRule = true + UIColor.black.setFill() + bezierPath.fill() + context.restoreGState() + + context.restoreGState() + } + //MARK: - Canvas Images @@ -14377,6 +14415,17 @@ class GridiconsGenerated: NSObject { return image } + class func imageOfGridiconspin(size: CGSize) -> UIImage { + var image: UIImage + + UIGraphicsBeginImageContextWithOptions(size, false, 0) + GridiconsGenerated.drawGridiconspin(frame: CGRect(origin: CGPoint.zero, size: size)) + image = UIGraphicsGetImageFromCurrentImageContext()! + UIGraphicsEndImageContext() + + return image + } + //MARK: - Resizing Behavior enum ResizingBehavior { From 8f63e16add5d22988fa20c1878485ffcb96b5f88 Mon Sep 17 00:00:00 2001 From: Daniele Bogo Date: Mon, 3 Sep 2018 15:25:05 +0100 Subject: [PATCH 2/8] Bump to version 0.17 --- Gridicons.podspec | 2 +- Gridicons/Gridicons/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gridicons.podspec b/Gridicons.podspec index a5c9c71..9c8c652 100644 --- a/Gridicons.podspec +++ b/Gridicons.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Gridicons" - s.version = "0.16" + s.version = "0.17" s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution." s.homepage = "http://apps.wordpress.com" diff --git a/Gridicons/Gridicons/Info.plist b/Gridicons/Gridicons/Info.plist index cb7d979..e84550b 100644 --- a/Gridicons/Gridicons/Info.plist +++ b/Gridicons/Gridicons/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.16 + 0.17 CFBundleSignature ???? CFBundleVersion From 81cf910c4e7145b1d89031e42bb44a43fb5ee190 Mon Sep 17 00:00:00 2001 From: Will Kwon Date: Wed, 5 Sep 2018 13:11:44 -0700 Subject: [PATCH 3/8] Update Gridicons.podspec --- Gridicons.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gridicons.podspec b/Gridicons.podspec index a5c9c71..c2a9d93 100644 --- a/Gridicons.podspec +++ b/Gridicons.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.homepage = "http://apps.wordpress.com" s.license = { :type => "GPLv2" } - s.author = { "James Frost" => "james.frost@automattic.com" } + s.author = { "Automattic" => "mobile@automattic.com" } s.social_media_url = "http://twitter.com/WordPressiOS" s.platform = :ios, "9.0" From e219d4313721a7399acfd417d87a0ff0aa5f7844 Mon Sep 17 00:00:00 2001 From: Daniele Bogo Date: Wed, 12 Sep 2018 10:20:16 +0100 Subject: [PATCH 4/8] Update Pin icon --- Gridicons/Gridicons/GridiconsGenerated.swift | 40 ++++++++++---------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Gridicons/Gridicons/GridiconsGenerated.swift b/Gridicons/Gridicons/GridiconsGenerated.swift index 92f90ab..dadaaf4 100644 --- a/Gridicons/Gridicons/GridiconsGenerated.swift +++ b/Gridicons/Gridicons/GridiconsGenerated.swift @@ -12370,34 +12370,36 @@ class GridiconsGenerated: NSObject { context.restoreGState() } - class func drawGridiconspin(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 18, height: 18), resizing: ResizingBehavior = .aspectFit) { + class func drawGridiconspin(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 14, height: 20), resizing: ResizingBehavior = .aspectFit) { let context = UIGraphicsGetCurrentContext()! /// Resize to Target Frame context.saveGState() - let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 18, height: 18), target: targetFrame) + let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 14, height: 20), target: targetFrame) context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY) - context.scaleBy(x: resizedFrame.width / 18, y: resizedFrame.height / 18) + context.scaleBy(x: resizedFrame.width / 14, y: resizedFrame.height / 20) /// gridicons-pin let bezierPath = UIBezierPath() - bezierPath.move(to: CGPoint(x: 5.55, y: 7.98)) - bezierPath.addLine(to: CGPoint(x: 9.98, y: 3.58)) - bezierPath.addCurve(to: CGPoint(x: 9.98, y: 0.72), controlPoint1: CGPoint(x: 9.15, y: 2.76), controlPoint2: CGPoint(x: 9.15, y: 1.53)) - bezierPath.addLine(to: CGPoint(x: 10.7, y: 0)) - bezierPath.addLine(to: CGPoint(x: 18, y: 7.26)) - bezierPath.addLine(to: CGPoint(x: 17.28, y: 7.87)) - bezierPath.addCurve(to: CGPoint(x: 14.4, y: 7.87), controlPoint1: CGPoint(x: 16.46, y: 8.69), controlPoint2: CGPoint(x: 15.22, y: 8.69)) - bezierPath.addLine(to: CGPoint(x: 9.98, y: 12.27)) - bezierPath.addCurve(to: CGPoint(x: 9.36, y: 17.28), controlPoint1: CGPoint(x: 10.9, y: 13.81), controlPoint2: CGPoint(x: 10.7, y: 15.85)) - bezierPath.addLine(to: CGPoint(x: 5.76, y: 13.7)) - bezierPath.addLine(to: CGPoint(x: 2.88, y: 16.57)) - bezierPath.addCurve(to: CGPoint(x: 0, y: 18), controlPoint1: CGPoint(x: 1.85, y: 17.39), controlPoint2: CGPoint(x: 0.82, y: 17.8)) - bezierPath.addCurve(to: CGPoint(x: 1.44, y: 15.14), controlPoint1: CGPoint(x: 0.21, y: 17.08), controlPoint2: CGPoint(x: 0.72, y: 16.16)) - bezierPath.addLine(to: CGPoint(x: 4.32, y: 12.27)) - bezierPath.addLine(to: CGPoint(x: 0.72, y: 8.69)) - bezierPath.addCurve(to: CGPoint(x: 5.55, y: 7.98), controlPoint1: CGPoint(x: 1.85, y: 7.26), controlPoint2: CGPoint(x: 3.91, y: 7.06)) + bezierPath.move(to: CGPoint(x: 14, y: 15)) + bezierPath.addCurve(to: CGPoint(x: 11, y: 10.08), controlPoint1: CGPoint(x: 14, y: 12.96), controlPoint2: CGPoint(x: 12.81, y: 11.16)) + bezierPath.addLine(to: CGPoint(x: 11, y: 3)) + bezierPath.addLine(to: CGPoint(x: 11.5, y: 3)) + bezierPath.addCurve(to: CGPoint(x: 13, y: 1.5), controlPoint1: CGPoint(x: 12.33, y: 3), controlPoint2: CGPoint(x: 13, y: 2.33)) + bezierPath.addCurve(to: CGPoint(x: 11.5, y: 0), controlPoint1: CGPoint(x: 13, y: 0.67), controlPoint2: CGPoint(x: 12.33, y: 0)) + bezierPath.addLine(to: CGPoint(x: 2.5, y: 0)) + bezierPath.addCurve(to: CGPoint(x: 1, y: 1.5), controlPoint1: CGPoint(x: 1.67, y: 0), controlPoint2: CGPoint(x: 1, y: 0.67)) + bezierPath.addCurve(to: CGPoint(x: 2.5, y: 3), controlPoint1: CGPoint(x: 1, y: 2.33), controlPoint2: CGPoint(x: 1.67, y: 3)) + bezierPath.addLine(to: CGPoint(x: 3, y: 3)) + bezierPath.addLine(to: CGPoint(x: 3, y: 10.08)) + bezierPath.addCurve(to: CGPoint(x: 0, y: 15), controlPoint1: CGPoint(x: 1.19, y: 11.16), controlPoint2: CGPoint(x: 0, y: 12.96)) + bezierPath.addLine(to: CGPoint(x: 6, y: 15)) + bezierPath.addLine(to: CGPoint(x: 6, y: 19)) + bezierPath.addCurve(to: CGPoint(x: 7, y: 20), controlPoint1: CGPoint(x: 6, y: 19.55), controlPoint2: CGPoint(x: 6.45, y: 20)) + bezierPath.addCurve(to: CGPoint(x: 8, y: 19), controlPoint1: CGPoint(x: 7.55, y: 20), controlPoint2: CGPoint(x: 8, y: 19.55)) + bezierPath.addLine(to: CGPoint(x: 8, y: 15)) + bezierPath.addLine(to: CGPoint(x: 14, y: 15)) bezierPath.close() context.saveGState() bezierPath.usesEvenOddFillRule = true From 1aa7607f8b9146a4db21b9ef1f64c0c255a3ffb7 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 14 Jan 2019 16:38:16 -0600 Subject: [PATCH 5/8] Add Xcode 10 workspace checks to increase performance on open of proj --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Gridicons.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Gridicons.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Gridicons.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Gridicons.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From 784a5d82dcca67b734c75dc22f3b351e73f6bb59 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 14 Jan 2019 16:38:38 -0600 Subject: [PATCH 6/8] Update the filter icon --- Gridicons/Gridicons/GridiconsGenerated.swift | 88 ++++++++++---------- 1 file changed, 42 insertions(+), 46 deletions(-) diff --git a/Gridicons/Gridicons/GridiconsGenerated.swift b/Gridicons/Gridicons/GridiconsGenerated.swift index dadaaf4..391f92e 100644 --- a/Gridicons/Gridicons/GridiconsGenerated.swift +++ b/Gridicons/Gridicons/GridiconsGenerated.swift @@ -8263,62 +8263,58 @@ class GridiconsGenerated: NSObject { context.restoreGState() } - class func drawGridiconsfilter(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 16, height: 17), resizing: ResizingBehavior = .aspectFit) { + class func drawGridiconsfilter(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 24, height: 24), resizing: ResizingBehavior = .aspectFit) { /// General Declarations let context = UIGraphicsGetCurrentContext()! - + /// Resize to Target Frame context.saveGState() - let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 16, height: 17), target: targetFrame) + let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 24, height: 24), target: targetFrame) context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY) - context.scaleBy(x: resizedFrame.width / 16, y: resizedFrame.height / 17) - context.translateBy(x: -1171, y: -301) - + context.scaleBy(x: resizedFrame.width / 24, y: resizedFrame.height / 24) + /// gridicons-filter do { context.saveGState() - context.translateBy(x: 1171, y: 301) - - /// filter - do { - context.saveGState() - - /// filter_1_ - do { - context.saveGState() - - /// Shape - let shape = UIBezierPath() - shape.move(to: CGPoint(x: 14.19, y: 0)) - shape.addLine(to: CGPoint(x: 1.01, y: 0)) - shape.addCurve(to: CGPoint(x: 0, y: 0.99), controlPoint1: CGPoint(x: 0.45, y: -0), controlPoint2: CGPoint(x: 0, y: 0.44)) - shape.addCurve(to: CGPoint(x: 0.3, y: 1.71), controlPoint1: CGPoint(x: -0, y: 1.26), controlPoint2: CGPoint(x: 0.11, y: 1.52)) - shape.addLine(to: CGPoint(x: 5.6, y: 7)) - shape.addLine(to: CGPoint(x: 5.6, y: 13)) - shape.addLine(to: CGPoint(x: 9.6, y: 17)) - shape.addLine(to: CGPoint(x: 9.6, y: 7)) - shape.addLine(to: CGPoint(x: 14.89, y: 1.71)) - shape.addCurve(to: CGPoint(x: 14.89, y: 0.3), controlPoint1: CGPoint(x: 15.28, y: 1.32), controlPoint2: CGPoint(x: 15.28, y: 0.69)) - shape.addCurve(to: CGPoint(x: 14.19, y: 0), controlPoint1: CGPoint(x: 14.71, y: 0.11), controlPoint2: CGPoint(x: 14.45, y: 0)) - shape.addLine(to: CGPoint(x: 14.19, y: 0)) - shape.close() - shape.move(to: CGPoint(x: 14.19, y: 0)) - context.saveGState() - context.translateBy(x: 0.41, y: -0) - shape.usesEvenOddFillRule = true - UIColor.black.setFill() - shape.fill() - context.restoreGState() - - context.restoreGState() - } - - context.restoreGState() - } - + + /// Rectangle + let rectangle = UIBezierPath() + rectangle.move(to: CGPoint.zero) + rectangle.addLine(to: CGPoint(x: 24, y: 0)) + rectangle.addLine(to: CGPoint(x: 24, y: 24)) + rectangle.addLine(to: CGPoint(x: 0, y: 24)) + rectangle.addLine(to: CGPoint.zero) + rectangle.close() + + /// Shape + let shape = UIBezierPath() + shape.move(to: CGPoint(x: 7, y: 14)) + shape.addLine(to: CGPoint(x: 11, y: 14)) + shape.addLine(to: CGPoint(x: 11, y: 12)) + shape.addLine(to: CGPoint(x: 7, y: 12)) + shape.addLine(to: CGPoint(x: 7, y: 14)) + shape.close() + shape.move(to: CGPoint(x: 3, y: 8)) + shape.addLine(to: CGPoint(x: 15, y: 8)) + shape.addLine(to: CGPoint(x: 15, y: 6)) + shape.addLine(to: CGPoint(x: 3, y: 6)) + shape.addLine(to: CGPoint(x: 3, y: 8)) + shape.close() + shape.move(to: CGPoint.zero) + shape.addLine(to: CGPoint(x: 0, y: 2)) + shape.addLine(to: CGPoint(x: 18, y: 2)) + shape.addLine(to: CGPoint(x: 18, y: 0)) + shape.addLine(to: CGPoint.zero) + shape.close() + context.saveGState() + context.translateBy(x: 3, y: 5) + UIColor.black.setFill() + shape.fill() + context.restoreGState() + context.restoreGState() } - + context.restoreGState() } From 046fc1fa064875dc0749472e10a5032aeb95b5a1 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 14 Jan 2019 16:39:11 -0600 Subject: [PATCH 7/8] Update project to 0.18 --- Gridicons/Gridicons/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gridicons/Gridicons/Info.plist b/Gridicons/Gridicons/Info.plist index e84550b..75533eb 100644 --- a/Gridicons/Gridicons/Info.plist +++ b/Gridicons/Gridicons/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.17 + 0.18 CFBundleSignature ???? CFBundleVersion From af9ba1b48de0149e5aeb2897c6322f89dd17c641 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 14 Jan 2019 16:39:20 -0600 Subject: [PATCH 8/8] Update podspec to 0.18 --- Gridicons.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gridicons.podspec b/Gridicons.podspec index f893d8a..65c54dd 100644 --- a/Gridicons.podspec +++ b/Gridicons.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Gridicons" - s.version = "0.17" + s.version = "0.18" s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution." s.homepage = "http://apps.wordpress.com"