Skip to content

Commit 5d3b797

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents ddb4798 + 3aa21db commit 5d3b797

File tree

11 files changed

+205
-7
lines changed

11 files changed

+205
-7
lines changed

.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
BUNDLE_PATH: "vendor/bundle"

.circleci/config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2.1
2+
3+
orbs:
4+
# This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs
5+
ios: wordpress-mobile/[email protected]
6+
7+
workflows:
8+
test_and_validate:
9+
jobs:
10+
- ios/test:
11+
name: Test
12+
workspace: Gridicons.xcworkspace
13+
scheme: Gridicons
14+
device: iPhone XS
15+
ios-version: "12.1"
16+
bundle-install: false
17+
pod-install: false
18+
- ios/validate-podspec:
19+
name: Validate Podspec
20+
podspec-path: Gridicons.podspec

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ xcuserdata/
2828
## Playgrounds
2929
timeline.xctimeline
3030
playground.xcworkspace
31+
32+
# Bundler
33+
vendor/

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org' do
2+
gem 'cocoapods', '1.5.3'
3+
end

Gemfile.lock

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.0)
5+
activesupport (4.2.11)
6+
i18n (~> 0.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
atomos (0.1.3)
11+
claide (1.0.2)
12+
cocoapods (1.5.3)
13+
activesupport (>= 4.0.2, < 5)
14+
claide (>= 1.0.2, < 2.0)
15+
cocoapods-core (= 1.5.3)
16+
cocoapods-deintegrate (>= 1.0.2, < 2.0)
17+
cocoapods-downloader (>= 1.2.0, < 2.0)
18+
cocoapods-plugins (>= 1.0.0, < 2.0)
19+
cocoapods-search (>= 1.0.0, < 2.0)
20+
cocoapods-stats (>= 1.0.0, < 2.0)
21+
cocoapods-trunk (>= 1.3.0, < 2.0)
22+
cocoapods-try (>= 1.1.0, < 2.0)
23+
colored2 (~> 3.1)
24+
escape (~> 0.0.4)
25+
fourflusher (~> 2.0.1)
26+
gh_inspector (~> 1.0)
27+
molinillo (~> 0.6.5)
28+
nap (~> 1.0)
29+
ruby-macho (~> 1.1)
30+
xcodeproj (>= 1.5.7, < 2.0)
31+
cocoapods-core (1.5.3)
32+
activesupport (>= 4.0.2, < 6)
33+
fuzzy_match (~> 2.0.4)
34+
nap (~> 1.0)
35+
cocoapods-deintegrate (1.0.2)
36+
cocoapods-downloader (1.2.2)
37+
cocoapods-plugins (1.0.0)
38+
nap
39+
cocoapods-search (1.0.0)
40+
cocoapods-stats (1.1.0)
41+
cocoapods-trunk (1.3.1)
42+
nap (>= 0.8, < 2.0)
43+
netrc (~> 0.11)
44+
cocoapods-try (1.1.0)
45+
colored2 (3.1.2)
46+
concurrent-ruby (1.1.4)
47+
escape (0.0.4)
48+
fourflusher (2.0.1)
49+
fuzzy_match (2.0.4)
50+
gh_inspector (1.1.3)
51+
i18n (0.9.5)
52+
concurrent-ruby (~> 1.0)
53+
minitest (5.11.3)
54+
molinillo (0.6.6)
55+
nanaimo (0.2.6)
56+
nap (1.1.0)
57+
netrc (0.11.0)
58+
ruby-macho (1.3.1)
59+
thread_safe (0.3.6)
60+
tzinfo (1.2.5)
61+
thread_safe (~> 0.1)
62+
xcodeproj (1.8.0)
63+
CFPropertyList (>= 2.3.3, < 4.0)
64+
atomos (~> 0.1.3)
65+
claide (>= 1.0.2, < 2.0)
66+
colored2 (~> 3.1)
67+
nanaimo (~> 0.2.6)
68+
69+
PLATFORMS
70+
ruby
71+
72+
DEPENDENCIES
73+
cocoapods (= 1.5.3)!
74+
75+
BUNDLED WITH
76+
1.17.2

Gridicons.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Gridicons"
3-
s.version = "0.18"
3+
s.version = "0.19"
44
s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution."
55

66
s.homepage = "http://apps.wordpress.com"

Gridicons/Gridicons/Gridicons.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public enum GridiconType: Int {
116116
case heading
117117
case grid
118118
case globe
119+
case gift
119120
case fullscreenExit
120121
case fullscreen
121122
case folderMultiple
@@ -450,6 +451,8 @@ public final class Gridicon: NSObject {
450451
return GridiconsGenerated.imageOfGridiconsgrid(size: size)
451452
case .globe:
452453
return GridiconsGenerated.imageOfGridiconsglobe(size: size)
454+
case .gift:
455+
return GridiconsGenerated.imageOfGridiconsgift(size: size)
453456
case .fullscreen:
454457
return GridiconsGenerated.imageOfGridiconsfullscreen(size: size)
455458
case .fullscreenExit:

Gridicons/Gridicons/GridiconsGenerated.swift

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12405,6 +12405,90 @@ class GridiconsGenerated: NSObject {
1240512405

1240612406
context.restoreGState()
1240712407
}
12408+
12409+
class func drawGridiconsgift(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 20, height: 21), resizing: ResizingBehavior = .aspectFit) {
12410+
/// General Declarations
12411+
let context = UIGraphicsGetCurrentContext()!
12412+
12413+
/// Resize to Target Frame
12414+
context.saveGState()
12415+
let resizedFrame = resizing.apply(rect: CGRect(x: 0, y: 0, width: 20, height: 21), target: targetFrame)
12416+
context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY)
12417+
context.scaleBy(x: resizedFrame.width / 20, y: resizedFrame.height / 21)
12418+
context.translateBy(x: -178, y: -323)
12419+
12420+
/// gridicons-gift
12421+
do {
12422+
context.saveGState()
12423+
context.translateBy(x: 178, y: 323)
12424+
12425+
/// Shape
12426+
let shape = UIBezierPath()
12427+
shape.move(to: CGPoint(x: 20, y: 5))
12428+
shape.addLine(to: CGPoint(x: 15.2, y: 5))
12429+
shape.addCurve(to: CGPoint(x: 16, y: 3), controlPoint1: CGPoint(x: 15.7, y: 4.5), controlPoint2: CGPoint(x: 16, y: 3.8))
12430+
shape.addCurve(to: CGPoint(x: 13, y: 0), controlPoint1: CGPoint(x: 16, y: 1.3), controlPoint2: CGPoint(x: 14.7, y: 0))
12431+
shape.addCurve(to: CGPoint(x: 10, y: 3), controlPoint1: CGPoint(x: 11.3, y: 0), controlPoint2: CGPoint(x: 10, y: 1.3))
12432+
shape.addCurve(to: CGPoint(x: 7, y: 0), controlPoint1: CGPoint(x: 10, y: 1.3), controlPoint2: CGPoint(x: 8.7, y: 0))
12433+
shape.addCurve(to: CGPoint(x: 4, y: 3), controlPoint1: CGPoint(x: 5.3, y: 0), controlPoint2: CGPoint(x: 4, y: 1.3))
12434+
shape.addCurve(to: CGPoint(x: 4.8, y: 5), controlPoint1: CGPoint(x: 4, y: 3.8), controlPoint2: CGPoint(x: 4.3, y: 4.5))
12435+
shape.addLine(to: CGPoint(x: 0, y: 5))
12436+
shape.addLine(to: CGPoint(x: 0, y: 11))
12437+
shape.addLine(to: CGPoint(x: 1, y: 11))
12438+
shape.addLine(to: CGPoint(x: 1, y: 19))
12439+
shape.addCurve(to: CGPoint(x: 3, y: 21), controlPoint1: CGPoint(x: 1, y: 20.1), controlPoint2: CGPoint(x: 1.9, y: 21))
12440+
shape.addLine(to: CGPoint(x: 17, y: 21))
12441+
shape.addCurve(to: CGPoint(x: 19, y: 19), controlPoint1: CGPoint(x: 18.1, y: 21), controlPoint2: CGPoint(x: 19, y: 20.1))
12442+
shape.addLine(to: CGPoint(x: 19, y: 11))
12443+
shape.addLine(to: CGPoint(x: 20, y: 11))
12444+
shape.addLine(to: CGPoint(x: 20, y: 5))
12445+
shape.close()
12446+
shape.move(to: CGPoint(x: 18, y: 9))
12447+
shape.addLine(to: CGPoint(x: 11, y: 9))
12448+
shape.addLine(to: CGPoint(x: 11, y: 7))
12449+
shape.addLine(to: CGPoint(x: 18, y: 7))
12450+
shape.addLine(to: CGPoint(x: 18, y: 9))
12451+
shape.close()
12452+
shape.move(to: CGPoint(x: 14, y: 3))
12453+
shape.addCurve(to: CGPoint(x: 13, y: 2), controlPoint1: CGPoint(x: 14, y: 2.4), controlPoint2: CGPoint(x: 13.6, y: 2))
12454+
shape.addCurve(to: CGPoint(x: 12, y: 3), controlPoint1: CGPoint(x: 12.4, y: 2), controlPoint2: CGPoint(x: 12, y: 2.4))
12455+
shape.addCurve(to: CGPoint(x: 13, y: 4), controlPoint1: CGPoint(x: 12, y: 3.6), controlPoint2: CGPoint(x: 12.4, y: 4))
12456+
shape.addCurve(to: CGPoint(x: 14, y: 3), controlPoint1: CGPoint(x: 13.6, y: 4), controlPoint2: CGPoint(x: 14, y: 3.6))
12457+
shape.close()
12458+
shape.move(to: CGPoint(x: 7, y: 2))
12459+
shape.addCurve(to: CGPoint(x: 8, y: 3), controlPoint1: CGPoint(x: 7.6, y: 2), controlPoint2: CGPoint(x: 8, y: 2.4))
12460+
shape.addCurve(to: CGPoint(x: 7, y: 4), controlPoint1: CGPoint(x: 8, y: 3.6), controlPoint2: CGPoint(x: 7.6, y: 4))
12461+
shape.addCurve(to: CGPoint(x: 6, y: 3), controlPoint1: CGPoint(x: 6.4, y: 4), controlPoint2: CGPoint(x: 6, y: 3.6))
12462+
shape.addCurve(to: CGPoint(x: 7, y: 2), controlPoint1: CGPoint(x: 6, y: 2.4), controlPoint2: CGPoint(x: 6.4, y: 2))
12463+
shape.close()
12464+
shape.move(to: CGPoint(x: 9, y: 7))
12465+
shape.addLine(to: CGPoint(x: 2, y: 7))
12466+
shape.addLine(to: CGPoint(x: 2, y: 9))
12467+
shape.addLine(to: CGPoint(x: 9, y: 9))
12468+
shape.addLine(to: CGPoint(x: 9, y: 7))
12469+
shape.close()
12470+
shape.move(to: CGPoint(x: 9, y: 11))
12471+
shape.addLine(to: CGPoint(x: 9, y: 19))
12472+
shape.addLine(to: CGPoint(x: 3, y: 19))
12473+
shape.addLine(to: CGPoint(x: 3, y: 11))
12474+
shape.addLine(to: CGPoint(x: 9, y: 11))
12475+
shape.close()
12476+
shape.move(to: CGPoint(x: 11, y: 11))
12477+
shape.addLine(to: CGPoint(x: 11, y: 19))
12478+
shape.addLine(to: CGPoint(x: 17, y: 19))
12479+
shape.addLine(to: CGPoint(x: 17, y: 11))
12480+
shape.addLine(to: CGPoint(x: 11, y: 11))
12481+
shape.close()
12482+
12483+
context.saveGState()
12484+
shape.usesEvenOddFillRule = true
12485+
UIColor.black.setFill()
12486+
shape.fill()
12487+
context.restoreGState()
12488+
}
12489+
12490+
context.restoreGState()
12491+
}
1240812492

1240912493

1241012494
//MARK: - Canvas Images
@@ -14423,6 +14507,17 @@ class GridiconsGenerated: NSObject {
1442314507

1442414508
return image
1442514509
}
14510+
14511+
class func imageOfGridiconsgift(size: CGSize) -> UIImage {
14512+
var image: UIImage
14513+
14514+
UIGraphicsBeginImageContextWithOptions(size, false, 0)
14515+
GridiconsGenerated.drawGridiconsgift(frame: CGRect(origin: CGPoint.zero, size: size))
14516+
image = UIGraphicsGetImageFromCurrentImageContext()!
14517+
UIGraphicsEndImageContext()
14518+
14519+
return image
14520+
}
1442614521

1442714522
//MARK: - Resizing Behavior
1442814523

Gridicons/Gridicons/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.18</string>
18+
<string>0.19</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

0 commit comments

Comments
 (0)