Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclync committed Sep 3, 2019
2 parents ddb4798 + 3aa21db commit 5d3b797
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_PATH: "vendor/bundle"
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2.1

orbs:
# This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs
ios: wordpress-mobile/[email protected]

workflows:
test_and_validate:
jobs:
- ios/test:
name: Test
workspace: Gridicons.xcworkspace
scheme: Gridicons
device: iPhone XS
ios-version: "12.1"
bundle-install: false
pod-install: false
- ios/validate-podspec:
name: Validate Podspec
podspec-path: Gridicons.podspec
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ xcuserdata/
## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Bundler
vendor/
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org' do
gem 'cocoapods', '1.5.3'
end
76 changes: 76 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
activesupport (4.2.11)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.5.3)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.5.3)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.5)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.7, < 2.0)
cocoapods-core (1.5.3)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.4)
escape (0.0.4)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
molinillo (0.6.6)
nanaimo (0.2.6)
nap (1.1.0)
netrc (0.11.0)
ruby-macho (1.3.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.8.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.5.3)!

BUNDLED WITH
1.17.2
2 changes: 1 addition & 1 deletion Gridicons.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Gridicons"
s.version = "0.18"
s.version = "0.19"
s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution."

s.homepage = "http://apps.wordpress.com"
Expand Down
3 changes: 3 additions & 0 deletions Gridicons/Gridicons/Gridicons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public enum GridiconType: Int {
case heading
case grid
case globe
case gift
case fullscreenExit
case fullscreen
case folderMultiple
Expand Down Expand Up @@ -450,6 +451,8 @@ public final class Gridicon: NSObject {
return GridiconsGenerated.imageOfGridiconsgrid(size: size)
case .globe:
return GridiconsGenerated.imageOfGridiconsglobe(size: size)
case .gift:
return GridiconsGenerated.imageOfGridiconsgift(size: size)
case .fullscreen:
return GridiconsGenerated.imageOfGridiconsfullscreen(size: size)
case .fullscreenExit:
Expand Down
95 changes: 95 additions & 0 deletions Gridicons/Gridicons/GridiconsGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12405,6 +12405,90 @@ class GridiconsGenerated: NSObject {

context.restoreGState()
}

class func drawGridiconsgift(frame targetFrame: CGRect = CGRect(x: 0, y: 0, width: 20, height: 21), 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: 20, height: 21), target: targetFrame)
context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY)
context.scaleBy(x: resizedFrame.width / 20, y: resizedFrame.height / 21)
context.translateBy(x: -178, y: -323)

/// gridicons-gift
do {
context.saveGState()
context.translateBy(x: 178, y: 323)

/// Shape
let shape = UIBezierPath()
shape.move(to: CGPoint(x: 20, y: 5))
shape.addLine(to: CGPoint(x: 15.2, y: 5))
shape.addCurve(to: CGPoint(x: 16, y: 3), controlPoint1: CGPoint(x: 15.7, y: 4.5), controlPoint2: CGPoint(x: 16, y: 3.8))
shape.addCurve(to: CGPoint(x: 13, y: 0), controlPoint1: CGPoint(x: 16, y: 1.3), controlPoint2: CGPoint(x: 14.7, y: 0))
shape.addCurve(to: CGPoint(x: 10, y: 3), controlPoint1: CGPoint(x: 11.3, y: 0), controlPoint2: CGPoint(x: 10, y: 1.3))
shape.addCurve(to: CGPoint(x: 7, y: 0), controlPoint1: CGPoint(x: 10, y: 1.3), controlPoint2: CGPoint(x: 8.7, y: 0))
shape.addCurve(to: CGPoint(x: 4, y: 3), controlPoint1: CGPoint(x: 5.3, y: 0), controlPoint2: CGPoint(x: 4, y: 1.3))
shape.addCurve(to: CGPoint(x: 4.8, y: 5), controlPoint1: CGPoint(x: 4, y: 3.8), controlPoint2: CGPoint(x: 4.3, y: 4.5))
shape.addLine(to: CGPoint(x: 0, y: 5))
shape.addLine(to: CGPoint(x: 0, y: 11))
shape.addLine(to: CGPoint(x: 1, y: 11))
shape.addLine(to: CGPoint(x: 1, y: 19))
shape.addCurve(to: CGPoint(x: 3, y: 21), controlPoint1: CGPoint(x: 1, y: 20.1), controlPoint2: CGPoint(x: 1.9, y: 21))
shape.addLine(to: CGPoint(x: 17, y: 21))
shape.addCurve(to: CGPoint(x: 19, y: 19), controlPoint1: CGPoint(x: 18.1, y: 21), controlPoint2: CGPoint(x: 19, y: 20.1))
shape.addLine(to: CGPoint(x: 19, y: 11))
shape.addLine(to: CGPoint(x: 20, y: 11))
shape.addLine(to: CGPoint(x: 20, y: 5))
shape.close()
shape.move(to: CGPoint(x: 18, y: 9))
shape.addLine(to: CGPoint(x: 11, y: 9))
shape.addLine(to: CGPoint(x: 11, y: 7))
shape.addLine(to: CGPoint(x: 18, y: 7))
shape.addLine(to: CGPoint(x: 18, y: 9))
shape.close()
shape.move(to: CGPoint(x: 14, y: 3))
shape.addCurve(to: CGPoint(x: 13, y: 2), controlPoint1: CGPoint(x: 14, y: 2.4), controlPoint2: CGPoint(x: 13.6, y: 2))
shape.addCurve(to: CGPoint(x: 12, y: 3), controlPoint1: CGPoint(x: 12.4, y: 2), controlPoint2: CGPoint(x: 12, y: 2.4))
shape.addCurve(to: CGPoint(x: 13, y: 4), controlPoint1: CGPoint(x: 12, y: 3.6), controlPoint2: CGPoint(x: 12.4, y: 4))
shape.addCurve(to: CGPoint(x: 14, y: 3), controlPoint1: CGPoint(x: 13.6, y: 4), controlPoint2: CGPoint(x: 14, y: 3.6))
shape.close()
shape.move(to: CGPoint(x: 7, y: 2))
shape.addCurve(to: CGPoint(x: 8, y: 3), controlPoint1: CGPoint(x: 7.6, y: 2), controlPoint2: CGPoint(x: 8, y: 2.4))
shape.addCurve(to: CGPoint(x: 7, y: 4), controlPoint1: CGPoint(x: 8, y: 3.6), controlPoint2: CGPoint(x: 7.6, y: 4))
shape.addCurve(to: CGPoint(x: 6, y: 3), controlPoint1: CGPoint(x: 6.4, y: 4), controlPoint2: CGPoint(x: 6, y: 3.6))
shape.addCurve(to: CGPoint(x: 7, y: 2), controlPoint1: CGPoint(x: 6, y: 2.4), controlPoint2: CGPoint(x: 6.4, y: 2))
shape.close()
shape.move(to: CGPoint(x: 9, y: 7))
shape.addLine(to: CGPoint(x: 2, y: 7))
shape.addLine(to: CGPoint(x: 2, y: 9))
shape.addLine(to: CGPoint(x: 9, y: 9))
shape.addLine(to: CGPoint(x: 9, y: 7))
shape.close()
shape.move(to: CGPoint(x: 9, y: 11))
shape.addLine(to: CGPoint(x: 9, y: 19))
shape.addLine(to: CGPoint(x: 3, y: 19))
shape.addLine(to: CGPoint(x: 3, y: 11))
shape.addLine(to: CGPoint(x: 9, y: 11))
shape.close()
shape.move(to: CGPoint(x: 11, y: 11))
shape.addLine(to: CGPoint(x: 11, y: 19))
shape.addLine(to: CGPoint(x: 17, y: 19))
shape.addLine(to: CGPoint(x: 17, y: 11))
shape.addLine(to: CGPoint(x: 11, y: 11))
shape.close()

context.saveGState()
shape.usesEvenOddFillRule = true
UIColor.black.setFill()
shape.fill()
context.restoreGState()
}

context.restoreGState()
}


//MARK: - Canvas Images
Expand Down Expand Up @@ -14423,6 +14507,17 @@ class GridiconsGenerated: NSObject {

return image
}

class func imageOfGridiconsgift(size: CGSize) -> UIImage {
var image: UIImage

UIGraphicsBeginImageContextWithOptions(size, false, 0)
GridiconsGenerated.drawGridiconsgift(frame: CGRect(origin: CGPoint.zero, size: size))
image = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()

return image
}

//MARK: - Resizing Behavior

Expand Down
2 changes: 1 addition & 1 deletion Gridicons/Gridicons/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.18</string>
<string>0.19</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/Automattic/Gridicons-iOS.svg?branch=develop)](https://travis-ci.org/Automattic/Gridicons-iOS)
[![CircleCI](https://circleci.com/gh/Automattic/Gridicons-iOS.svg?style=svg)](https://circleci.com/gh/Automattic/Gridicons-iOS)
[![Version](https://img.shields.io/cocoapods/v/Gridicons.svg?style=flat)](http://cocoadocs.org/docsets/Gridicons)
[![License](https://img.shields.io/cocoapods/l/Gridicons.svg?style=flat)](http://cocoadocs.org/docsets/Gridicons)
[![Platform](https://img.shields.io/cocoapods/p/Gridicons.svg?style=flat)](http://cocoadocs.org/docsets/Gridicons)
Expand Down

0 comments on commit 5d3b797

Please sign in to comment.