Repository: natmark/ProcessingKit Branch: master Commit: 0cc2a6fa90c6 Files: 116 Total size: 413.4 KB Directory structure: gitextract_e3r80g08/ ├── .gitignore ├── .swift-version ├── .swiftlint.yml ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── ProcessingKit/ │ ├── Core/ │ │ ├── Color/ │ │ │ └── Color.swift │ │ ├── Constants/ │ │ │ └── Constants.swift │ │ ├── Context/ │ │ │ └── Context.swift │ │ ├── Environment/ │ │ │ └── Frame.swift │ │ ├── Extensions/ │ │ │ ├── CGPoint.swift │ │ │ ├── NSImage.swift │ │ │ ├── NSView.swift │ │ │ ├── String.swift │ │ │ └── UIColor.swift │ │ ├── Image/ │ │ │ └── Image.swift │ │ ├── Input/ │ │ │ ├── Date.swift │ │ │ └── Gesture.swift │ │ ├── Shape/ │ │ │ ├── Shape.swift │ │ │ └── Vertex.swift │ │ ├── Structure/ │ │ │ └── Loop.swift │ │ ├── Transform/ │ │ │ └── Transform.swift │ │ └── Typography/ │ │ └── Text.swift │ ├── Demo.playground/ │ │ ├── Contents.swift │ │ └── contents.xcplayground │ ├── Info.plist │ ├── ProcessingKit.h │ ├── ProcessingView+Core/ │ │ ├── ProcessingView+Color.swift │ │ ├── ProcessingView+Constants.swift │ │ ├── ProcessingView+Date.swift │ │ ├── ProcessingView+Frame.swift │ │ ├── ProcessingView+Gesture.swift │ │ ├── ProcessingView+Image.swift │ │ ├── ProcessingView+Loop.swift │ │ ├── ProcessingView+Shape.swift │ │ ├── ProcessingView+Text.swift │ │ ├── ProcessingView+Transform.swift │ │ └── ProcessingView+Vertex.swift │ └── ProcessingView.swift ├── ProcessingKit.podspec ├── ProcessingKit.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata/ │ └── xcschemes/ │ ├── ProcessingKit OSX.xcscheme │ ├── ProcessingKit.xcscheme │ └── ProcessingKitTests.xcscheme ├── ProcessingKit.xctemplate/ │ ├── TemplateInfo.plist │ └── ___FILEBASENAME___.swift ├── ProcessingKitExample/ │ ├── ProcessingKitExample/ │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── ProcessingKit-Logo.imageset/ │ │ │ └── Contents.json │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── BasicFunctions/ │ │ │ ├── ArcSampleView.swift │ │ │ ├── ArcSampleViewController.storyboard │ │ │ ├── ArcSampleViewController.swift │ │ │ ├── CurveSampleView.swift │ │ │ ├── CurveSampleViewController.storyboard │ │ │ ├── CurveSampleViewController.swift │ │ │ ├── EllipseSampleView.swift │ │ │ ├── EllipseSampleViewController.storyboard │ │ │ ├── EllipseSampleViewController.swift │ │ │ ├── ImageSampleView.swift │ │ │ ├── ImageSampleViewController.storyboard │ │ │ ├── ImageSampleViewController.swift │ │ │ ├── QuadSampleView.swift │ │ │ ├── QuadSampleViewController.storyboard │ │ │ ├── QuadSampleViewController.swift │ │ │ ├── RectSampleView.swift │ │ │ ├── RectSampleViewController.storyboard │ │ │ ├── RectSampleViewController.swift │ │ │ ├── TextSampleView.swift │ │ │ ├── TextSampleViewController.storyboard │ │ │ ├── TextSampleViewController.swift │ │ │ ├── TriangleSampleView.swift │ │ │ ├── TriangleSampleViewController.storyboard │ │ │ └── TriangleSampleViewController.swift │ │ ├── Extensions/ │ │ │ └── ViewController.swift │ │ ├── Info.plist │ │ ├── MainTableViewController.swift │ │ ├── OthersSample/ │ │ │ ├── ClockSampleView.swift │ │ │ ├── ClockSampleViewController.storyboard │ │ │ ├── ClockSampleViewController.swift │ │ │ ├── ParticlesSampleView.swift │ │ │ ├── ParticlesSampleViewController.storyboard │ │ │ └── ParticlesSampleViewController.swift │ │ └── TouchSample/ │ │ ├── TouchSampleView.swift │ │ ├── TouchSampleViewController.storyboard │ │ └── TouchSampleViewController.swift │ └── ProcessingKitExample.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ ├── contents.xcworkspacedata │ └── xcshareddata/ │ └── IDEWorkspaceChecks.plist ├── ProcessingKitOSXExample/ │ ├── ProcessingKitOSXExample/ │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets/ │ │ │ └── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Base.lproj/ │ │ │ └── Main.storyboard │ │ ├── CustomView.swift │ │ ├── Info.plist │ │ ├── ProcessingKitOSXExample.entitlements │ │ └── ViewController.swift │ ├── ProcessingKitOSXExample.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── IDEWorkspaceChecks.plist │ └── ProcessingKitOSXExampleTests/ │ ├── Info.plist │ └── ProcessingKitOSXExampleTests.swift ├── ProcessingKitTests/ │ ├── CGPath+Extension/ │ │ └── CGPath+Extension.swift │ ├── GestureTests.swift │ ├── Info.plist │ ├── Input/ │ │ └── DateTests.swift │ ├── ProcessingViewDelegateSpy.swift │ ├── ProcessingViewTests.swift │ ├── ShapeTests.swift │ └── TransformTests.swift └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated build/ DerivedData/ ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ ## Other *.moved-aside *.xccheckout *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa *.dSYM.zip *.dSYM ## Playgrounds timeline.xctimeline playground.xcworkspace # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ # Package.pins .build/ # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/#source-control fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output ================================================ FILE: .swift-version ================================================ 4.2.1 ================================================ FILE: .swiftlint.yml ================================================ disabled_rules: # rule identifiers to exclude from running - force_cast - force_try - function_parameter_count - line_length - todo - trailing_comma - valid_docs - variable_name included: - ProcessingKit/ excluded: # paths to ignore during linting. type_body_length: - 400 # warning - 500 # error function_body_length: - 150 # warning - 200 # error file_length: warning: 600 # warning error: 1000 # error type_name: max_length: warning: 60 # warning error: 80 # error vertical_whitespace: severity: error trailing_newline: severity: error variable_name: min_length: # not possible to disable this partial rule, so set it to zero warning: 0 error: 0 max_length: warning: 60 # warning error: 80 # error excluded: - id - e ================================================ FILE: .travis.yml ================================================ osx_image: xcode10.1 language: objective-c branches: only: - master before_install: - gem install xcpretty before_script: - set -o pipefail script: - swiftlint - xcodebuild test -project ./ProcessingKit.xcodeproj -scheme ProcessingKitTests -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=12.0,name=iPhone X' | xcpretty -c - xcodebuild -project ./ProcessingKit.xcodeproj -scheme 'ProcessingKit OSX' -configuration Debug | xcpretty -c after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at natmark0918@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project. ## Pull Request Process 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. 2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. 3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. ## Code of Conduct ### Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ### Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ### Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ### Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ### Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at natmark0918@gmail.com . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ### Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2017 Atsuya Sato Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: ProcessingKit/Core/Color/Color.swift ================================================ // // Color.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/13. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol ColorComponentsContract { var fill: UIColor { get set } var stroke: UIColor { get set } var strokeWeight: CGFloat { get set } } public protocol ColorModelContract { func background(_ color: UIColor) func background(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) func clear() mutating func fill(_ color: UIColor) mutating func fill(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) mutating func stroke(_ color: UIColor) mutating func stroke(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) mutating func strokeWeight(_ weight: CGFloat) mutating func noFill() mutating func noStroke() } public class ColorComponents: ColorComponentsContract { public var fill: UIColor = UIColor.white public var stroke: UIColor = UIColor.clear public var strokeWeight: CGFloat = 1.0 public init() {} } public struct ColorModel: ColorModelContract { private var contextComponents: ContextComponenetsContract private var colorComponents: ColorComponentsContract private var frameComponents: FrameComponentsContract public init(contextComponents: ContextComponenetsContract, colorComponents: ColorComponentsContract, frameComponents: FrameComponentsContract) { self.contextComponents = contextComponents self.colorComponents = colorComponents self.frameComponents = frameComponents } public func background(_ color: UIColor) { let context = self.contextComponents.context context?.clear(self.frameComponents.bounds) } public func background(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) { self.background(UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a / 255.0)) } public func clear() { let context = self.contextComponents.context context?.clear(self.frameComponents.bounds) } public mutating func fill(_ color: UIColor) { self.colorComponents.fill = color } public mutating func fill(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) { self.fill(UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a / 255.0)) } public mutating func stroke(_ color: UIColor) { self.colorComponents.stroke = color } public mutating func stroke(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) { self.stroke(UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a / 255.0)) } public mutating func strokeWeight(_ weight: CGFloat) { self.colorComponents.strokeWeight = weight } public mutating func noFill() { self.colorComponents.fill = UIColor.clear } public mutating func noStroke() { self.colorComponents.stroke = UIColor.clear } } ================================================ FILE: ProcessingKit/Core/Constants/Constants.swift ================================================ // // Constants.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/13. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol Constants { var HALF_PI: CGFloat { get } var PI: CGFloat { get } var QUARTER_PI: CGFloat { get } var TAU: CGFloat { get } var TWO_PI: CGFloat { get } } ================================================ FILE: ProcessingKit/Core/Context/Context.swift ================================================ // // Context.swift // ProcessingKit // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa public typealias UIColor = NSColor public typealias UIImageView = NSImageView public typealias UIImage = NSImage public typealias UIViewController = NSViewController public typealias UITouch = NSTouch public typealias UIFont = NSFont public typealias UIEvent = NSEvent public typealias UIView = NSView public typealias UIResponder = NSResponder public typealias CGRect = NSRect public typealias CGPoint = NSPoint #endif public protocol ContextComponenetsContract { var context: CGContext? { get } } public class ContextComponents: ContextComponenetsContract { public init() { } public var context: CGContext? { #if os(iOS) return UIGraphicsGetCurrentContext() #elseif os(OSX) return NSGraphicsContext.current?.cgContext #endif } } ================================================ FILE: ProcessingKit/Core/Environment/Frame.swift ================================================ // // Frame.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/13. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol FrameComponentsContract { var bounds: CGRect { get set } var frame: CGRect { get set } var frameRate: CGFloat { get set } var frameCount: UInt64 { get set } } public protocol FrameModelContract { var width: CGFloat { get } var height: CGFloat { get } var frameRate: CGFloat { get } mutating func frameRate(_ fps: CGFloat) } public class FrameComponents: FrameComponentsContract { public var bounds: CGRect = CGRect.zero public var frame: CGRect = CGRect.zero public var frameRate: CGFloat = 60.0 public var frameCount: UInt64 = 0 public init() {} } public struct FrameModel: FrameModelContract { private var frameComponents: FrameComponentsContract private var timer: Timer? public init(frameComponents: FrameComponentsContract, timer: Timer?) { self.frameComponents = frameComponents self.timer = timer } public var width: CGFloat { return self.frameComponents.bounds.size.width } public var height: CGFloat { return self.frameComponents.bounds.size.height } public var frameRate: CGFloat { return self.frameComponents.frameRate } public mutating func frameRate(_ fps: CGFloat) { self.frameComponents.frameRate = fps } } ================================================ FILE: ProcessingKit/Core/Extensions/CGPoint.swift ================================================ // // CGPoint.swift // ProcessingKit // // Created by AtsuyaSato on 2017/12/30. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension CGPoint: Hashable { func distance(point: CGPoint) -> Float { let dx = Float(x - point.x) let dy = Float(y - point.y) return sqrt((dx * dx) + (dy * dy)) } public var hashValue: Int { return x.hashValue << 32 ^ y.hashValue } } func == (lhs: CGPoint, rhs: CGPoint) -> Bool { return lhs.distance(point: rhs) < 0.000001 } extension CGPoint { func addTo(_ a: CGPoint) -> CGPoint { return CGPoint(x: self.x + a.x, y: self.y + a.y) } func deltaTo(_ a: CGPoint) -> CGPoint { return CGPoint(x: self.x - a.x, y: self.y - a.y) } func multiplyBy(_ value: CGFloat) -> CGPoint { return CGPoint(x: self.x * value, y: self.y * value) } func length() -> CGFloat { return CGFloat(sqrt(CDouble( self.x*self.x + self.y*self.y ))) } } ================================================ FILE: ProcessingKit/Core/Extensions/NSImage.swift ================================================ // // NSImage.swift // ProcessingKit // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(OSX) import Cocoa #endif extension NSImage { var cgImage: CGImage? { var imageRect = NSRect(x: 0, y: 0, width: size.width, height: size.height) #if swift(>=3.0) guard let image = cgImage(forProposedRect: &imageRect, context: nil, hints: nil) else { return nil } #else guard let image = CGImageForProposedRect(&imageRect, context: nil, hints: nil) else { return nil } #endif return image } } ================================================ FILE: ProcessingKit/Core/Extensions/NSView.swift ================================================ // // NSView.swift // ProcessingKit // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #if os(OSX) import Cocoa #endif extension NSView { var backgroundColor: NSColor? { get { guard let layer = layer, let backgroundColor = layer.backgroundColor else {return nil} return NSColor(cgColor: backgroundColor) } set { wantsLayer = true layer?.backgroundColor = newValue?.cgColor } } } ================================================ FILE: ProcessingKit/Core/Extensions/String.swift ================================================ // // String.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #if os(iOS) import UIKit #else import Cocoa #endif extension String { func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloat { let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude) let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: font], context: nil) return ceil(boundingBox.height) } } ================================================ FILE: ProcessingKit/Core/Extensions/UIColor.swift ================================================ // // UIColor.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension UIColor { class func hexStr (hexStr: NSString, alpha: CGFloat) -> UIColor { let alpha = alpha var hexStr = hexStr hexStr = hexStr.replacingOccurrences(of: "#", with: "") as NSString let scanner = Scanner(string: hexStr as String) var color: UInt32 = 0 if scanner.scanHexInt32(&color) { let r = CGFloat((color & 0xFF0000) >> 16) / 255.0 let g = CGFloat((color & 0x00FF00) >> 8) / 255.0 let b = CGFloat(color & 0x0000FF) / 255.0 return UIColor(red: r, green: g, blue: b, alpha: alpha) } else { print("invalid hex string") return UIColor.white } } } ================================================ FILE: ProcessingKit/Core/Image/Image.swift ================================================ // // Image.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol ImageModelContract { #if os(iOS) func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat) func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) #elseif os(OSX) func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat) func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) #endif } public struct ImageModel: ImageModelContract { private var contextComponents: ContextComponenetsContract public init(contextComponents: ContextComponenetsContract) { self.contextComponents = contextComponents } #if os(iOS) public func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat) { let context = self.contextComponents.context context?.saveGState() context?.translateBy(x: 0.0, y: img.size.height) context?.scaleBy(x: 1.0, y: -1.0) if let cgImg = img.cgImage { context?.draw(cgImg, in: CGRect(x: x, y: y, width: img.size.width, height: img.size.height)) } context?.restoreGState() } public func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { let context = self.contextComponents.context context?.saveGState() context?.translateBy(x: 0.0, y: height) context?.scaleBy(x: 1.0, y: -1.0) if let cgImg = img.cgImage { context?.draw(cgImg, in: CGRect(x: x, y: -y, width: width, height: height)) } context?.restoreGState() } #elseif os(OSX) public func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat) { let context = self.contextComponents.context context?.saveGState() context?.translateBy(x: 0.0, y: img.size.height) context?.scaleBy(x: 1.0, y: -1.0) if let cgImg = img.cgImage { context?.draw(cgImg, in: CGRect(x: x, y: y, width: img.size.width, height: img.size.height)) } context?.restoreGState() } public func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { let context = self.contextComponents.context context?.saveGState() context?.translateBy(x: 0.0, y: height) context?.scaleBy(x: 1.0, y: -1.0) if let cgImg = img.cgImage { context?.draw(cgImg, in: CGRect(x: x, y: -y, width: width, height: height)) } context?.restoreGState() } #endif } ================================================ FILE: ProcessingKit/Core/Input/Date.swift ================================================ // // Date.swift // ProcessingKit // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation public protocol DateModelContract { func millis() -> Int func second() -> Int func minute() -> Int func hour() -> Int func day() -> Int func month() -> Int func year() -> Int } public struct DateModel: DateModelContract { private var currentDate: Date? private var startDate: Date // for test public init(startDate: Date, currentDate: Date) { self.startDate = startDate self.currentDate = currentDate } public init(startDate: Date) { self.startDate = startDate } public func millis() -> Int { return self.getMillis() } public func second() -> Int { return self.getComponents().second ?? 0 } public func minute() -> Int { return self.getComponents().minute ?? 0 } public func hour() -> Int { return self.getComponents().hour ?? 0 } public func day() -> Int { return self.getComponents().day ?? 0 } public func month() -> Int { return self.getComponents().month ?? 0 } public func year() -> Int { return self.getComponents().year ?? 0 } private func getMillis() -> Int { let date = Date().timeIntervalSince(startDate) let intMax = Double(Int.max) if intMax <= date * 1000 { return -1 } return Int(date * 1000) } private func getComponents() -> DateComponents { let calendar = Calendar.current let components = calendar.dateComponents([.year, .month, .day, .hour, .minute, .second], from: currentDate ?? Date()) return components } } ================================================ FILE: ProcessingKit/Core/Input/Gesture.swift ================================================ // // Gesture.swift // ProcessingKit // // Created by AtsuyaSato on 2018/10/07. // Copyright © 2018 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public enum GestureEvent { #if os(iOS) case didTap case didRelease case didDrag case didSwipe(direction: UISwipeGestureRecognizer.Direction) case didPinch(scale: CGFloat, velocity: CGFloat) case didRotate(rotation: CGFloat, velocity: CGFloat) case didLongPress #elseif os(OSX) case didClick case didRelease case didDrag case didMove case didMagnify(magnification: CGFloat) case didRotate(rotation: CGFloat, inDegrees: CGFloat) case didPress case didScroll(x: CGFloat, y: CGFloat) #endif } public protocol GestureComponentsContract { var delegateEvents: [GestureEvent] { get set } #if os(iOS) var isPressed: Bool { get set } var touchX: CGFloat { get set } var touchY: CGFloat { get set } var touches: Set { get set } #elseif os(OSX) var isPressed: Bool { get set } var mouseX: CGFloat { get set } var mouseY: CGFloat { get set } #endif } public protocol GestureModelContract { #if os(iOS) var fingerPressed: Bool { get } var touchX: CGFloat { get } var touchY: CGFloat { get } var touches: Set { get } mutating func didTap(recognizer: UITapGestureRecognizer) mutating func didTapExit(recognizer: UITapGestureRecognizer) mutating func didPan(recognizer: UIPanGestureRecognizer) mutating func didSwipe(recognizer: UISwipeGestureRecognizer) mutating func didPinch(recognizer: UIPinchGestureRecognizer) mutating func didRotate(recognizer: UIRotationGestureRecognizer) mutating func didLongPress(recognizer: UILongPressGestureRecognizer) mutating func touchesBegan(_ touches: Set) mutating func touchesMoved(_ touches: Set) mutating func touchesEnded(_ touches: Set) #elseif os(OSX) var mousePressed: Bool { get } var mouseX: CGFloat { get } var mouseY: CGFloat { get } mutating func didClick(recognizer: NSClickGestureRecognizer) mutating func didClickExit(recognizer: NSClickGestureRecognizer) mutating func didMagnify(recognizer: NSMagnificationGestureRecognizer) mutating func didPan(recognizer: NSPanGestureRecognizer) mutating func didPress(recognizer: NSPressGestureRecognizer) mutating func didRotate(recognizer: NSRotationGestureRecognizer) mutating func scrollWheel(with event: NSEvent) mutating func mouseMoved(with event: NSEvent) mutating func mouseDown(_ location: NSPoint) mutating func mouseDragged(_ location: NSPoint) mutating func mouseUp(_ location: NSPoint) mutating func mouseMoved(_ location: NSPoint) #endif } public class GestureComponents: GestureComponentsContract { public var delegateEvents: [GestureEvent] = [] #if os(iOS) public var isPressed = false public var touchX: CGFloat = 0.0 public var touchY: CGFloat = 0.0 public var touches: Set = [] #elseif os(OSX) public var isPressed: Bool = false public var mouseX: CGFloat = 0.0 public var mouseY: CGFloat = 0.0 #endif public init() {} } public struct GestureModel: GestureModelContract { private var gestureComponents: GestureComponentsContract private var frameComponents: FrameComponentsContract public init(gestureComponents: GestureComponentsContract, frameComponents: FrameComponentsContract) { self.gestureComponents = gestureComponents self.frameComponents = frameComponents } #if os(iOS) public var fingerPressed: Bool { return self.gestureComponents.isPressed } public var touchX: CGFloat { return self.gestureComponents.touches.first?.x ?? 0.0 } public var touchY: CGFloat { return self.gestureComponents.touches.first?.y ?? 0.0 } public var touches: Set { return self.gestureComponents.touches } #elseif os(OSX) public var mousePressed: Bool { return self.gestureComponents.isPressed } public var mouseX: CGFloat { return self.gestureComponents.mouseX } public var mouseY: CGFloat { return self.gestureComponents.mouseY } #endif #if os(iOS) public mutating func touchesBegan(_ touches: Set) { self.gestureComponents.touches = touches self.gestureComponents.isPressed = true } public mutating func touchesMoved(_ touches: Set) { self.gestureComponents.touches = touches } public mutating func touchesEnded(_ touches: Set) { self.gestureComponents.touches.removeAll() self.gestureComponents.isPressed = false } public mutating func didTap(recognizer: UITapGestureRecognizer) { self.touchesBegan(self.touchesFrom(recognizer: recognizer)) self.gestureComponents.delegateEvents.append(.didTap) } public mutating func didTapExit(recognizer: UITapGestureRecognizer) { self.touchesEnded(self.touchesFrom(recognizer: recognizer)) } public mutating func didPan(recognizer: UIPanGestureRecognizer) { self.handleTap(recognizer: recognizer) self.gestureComponents.delegateEvents.append(.didDrag) } public mutating func didSwipe(recognizer: UISwipeGestureRecognizer) { self.gestureComponents.delegateEvents.append(.didSwipe(direction: recognizer.direction)) } public mutating func didPinch(recognizer: UIPinchGestureRecognizer) { self.handleTap(recognizer: recognizer) self.gestureComponents.delegateEvents.append(.didPinch(scale: recognizer.scale, velocity: recognizer.velocity)) } public mutating func didRotate(recognizer: UIRotationGestureRecognizer) { self.handleTap(recognizer: recognizer) self.gestureComponents.delegateEvents.append(.didRotate(rotation: recognizer.rotation, velocity: recognizer.velocity)) } public mutating func didLongPress(recognizer: UILongPressGestureRecognizer) { self.handleTap(recognizer: recognizer) self.gestureComponents.delegateEvents.append(.didLongPress) } private mutating func handleTap(recognizer: UIGestureRecognizer) { switch recognizer.state { case .possible: return case .began: self.touchesBegan(touchesFrom(recognizer: recognizer)) case .changed: self.touchesMoved(touchesFrom(recognizer: recognizer)) case .ended: self.touchesEnded(touchesFrom(recognizer: recognizer)) case .cancelled: self.touchesEnded(touchesFrom(recognizer: recognizer)) case .failed: self.touchesEnded(touchesFrom(recognizer: recognizer)) } } private func touchesFrom(recognizer: UIGestureRecognizer) -> Set { var touches = Set() for i in 0.. NSPoint { return recognizer.location(in: recognizer.view) } private func convertCoordinateSystem(location: NSPoint) -> NSPoint { let height = frameComponents.frame.size.height // MARK: Coordinate systems are different between iOS and OS X return NSPoint(x: location.x, y: height - location.y) } #endif } ================================================ FILE: ProcessingKit/Core/Shape/Shape.swift ================================================ // // Graphics.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/09. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol ShapeModelContract { func point(_ x: CGFloat, _ y: CGFloat) func line(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat) func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ radius: CGFloat) func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ topLeftRadius: CGFloat, _ topRightRadius: CGFloat, _ bottomLeftRadius: CGFloat, _ bottomRightRadius: CGFloat) func ellipse(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) func arc(_ x: CGFloat, _ y: CGFloat, _ radius: CGFloat, _ start: CGFloat, _ stop: CGFloat) func triangle(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat) func quad(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat, _ x4: CGFloat, _ y4: CGFloat) func curve(_ cpx1: CGFloat, _ cpy1: CGFloat, _ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat) func bezier(_ x1: CGFloat, _ y1: CGFloat, _ cpx1: CGFloat, _ cpy1: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat, _ x2: CGFloat, _ y2: CGFloat) func radians(_ degrees: CGFloat) -> CGFloat } public struct ShapeModel: ShapeModelContract { private var colorComponents: ColorComponentsContract private var contextComponents: ContextComponenetsContract public init(contextComponents: ContextComponenetsContract, colorComponents: ColorComponentsContract) { self.contextComponents = contextComponents self.colorComponents = colorComponents } public func point(_ x: CGFloat, _ y: CGFloat) { let context = self.contextComponents.context context?.setFillColor(self.colorComponents.stroke.cgColor) drawing(mode: .fill) { let width = self.colorComponents.strokeWeight let height = self.colorComponents.strokeWeight context?.addEllipse(in: CGRect(x: x - width / 2, y: y - height / 2, width: width, height: height)) } } public func line(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .stroke) { context?.move(to: CGPoint(x: x1, y: y1)) context?.addLine(to: CGPoint(x: x2, y: y2)) } } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.addRect(CGRect(x: x, y: y, width: width, height: height)) } } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ radius: CGFloat) { self.rect(x, y, width, height, radius, radius, radius, radius) } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ topLeftRadius: CGFloat, _ topRightRadius: CGFloat, _ bottomLeftRadius: CGFloat, _ bottomRightRadius: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) var topLeftRadius = topLeftRadius var topRightRadius = topRightRadius var bottomLeftRadius = bottomLeftRadius var bottomRightRadius = bottomRightRadius if topLeftRadius > min(width, height) / 2 { topLeftRadius = min(width, height) / 2 } if topRightRadius > min(width, height) / 2 { topRightRadius = min(width, height) / 2 } if bottomLeftRadius > min(width, height) / 2 { bottomLeftRadius = min(width, height) / 2 } if bottomRightRadius > min(width, height) / 2 { bottomRightRadius = min(width, height) / 2 } drawing(mode: .fillStroke) { context?.beginPath() context?.move(to: CGPoint(x: x + topLeftRadius, y: y)) context?.addLine(to: CGPoint(x: x + width - topRightRadius, y: y)) context?.addArc(center: CGPoint(x: x + width - topRightRadius, y: y + topRightRadius), radius: topRightRadius, startAngle: radians(-90), endAngle: radians(0), clockwise: false) context?.addLine(to: CGPoint(x: x + width, y: y + height - bottomRightRadius)) context?.addArc(center: CGPoint(x: x + width - bottomRightRadius, y: y + height - bottomRightRadius), radius: bottomRightRadius, startAngle: radians(0), endAngle: radians(90), clockwise: false) context?.addLine(to: CGPoint(x: x + bottomLeftRadius, y: y + height)) context?.addArc(center: CGPoint(x: x + bottomLeftRadius, y: y + height - bottomLeftRadius), radius: bottomLeftRadius, startAngle: radians(90), endAngle: radians(180), clockwise: false) context?.addLine(to: CGPoint(x: x, y: y + topLeftRadius)) context?.addArc(center: CGPoint(x: x + topLeftRadius, y: y + topLeftRadius), radius: topLeftRadius, startAngle: radians(180), endAngle: radians(270), clockwise: false) context?.closePath() } } public func ellipse(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.addEllipse(in: CGRect(x: x - width / 2, y: y - height / 2, width: width, height: height)) } } public func arc(_ x: CGFloat, _ y: CGFloat, _ radius: CGFloat, _ start: CGFloat, _ stop: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.addArc(center: CGPoint(x: x, y: y), radius: radius, startAngle: start, endAngle: stop, clockwise: false) } } public func triangle(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.beginPath() context?.move(to: CGPoint(x: x1, y: y1)) context?.addLine(to: CGPoint(x: x2, y: y2)) context?.addLine(to: CGPoint(x: x3, y: y3)) context?.closePath() } } public func quad(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat, _ x4: CGFloat, _ y4: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.beginPath() context?.move(to: CGPoint(x: x1, y: y1)) context?.addLine(to: CGPoint(x: x2, y: y2)) context?.addLine(to: CGPoint(x: x3, y: y3)) context?.addLine(to: CGPoint(x: x4, y: y4)) context?.closePath() } } public func curve(_ cpx1: CGFloat, _ cpy1: CGFloat, _ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) let (b1, b2) = ShapeModel.convertCurvePoint(cpx1, cpy1, x1, y1, x2, y2, cpx2, cpy2) drawing(mode: .fillStroke) { context?.move(to: CGPoint(x: x1, y: y1)) context?.addCurve(to: CGPoint(x: x2, y: y2), control1: CGPoint(x: b1.x, y: b1.y), control2: CGPoint(x: b2.x, y: b2.y)) } } public func bezier(_ x1: CGFloat, _ y1: CGFloat, _ cpx1: CGFloat, _ cpy1: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat, _ x2: CGFloat, _ y2: CGFloat) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) drawing(mode: .fillStroke) { context?.move(to: CGPoint(x: x1, y: y1)) context?.addCurve(to: CGPoint(x: x2, y: y2), control1: CGPoint(x: cpx1, y: cpy1), control2: CGPoint(x: cpx2, y: cpy2)) } } public func radians(_ degrees: CGFloat) -> CGFloat { let radian = (CGFloat.pi * 2) * (degrees / 360.0) return radian } // For testing static func convertCurvePoint(_ cpx1: CGFloat, _ cpy1: CGFloat, _ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat) -> (CGPoint, CGPoint) { let alpha: CGFloat = 1.0 let p0 = CGPoint(x: cpx1, y: cpy1) let p1 = CGPoint(x: x1, y: y1) let p2 = CGPoint(x: x2, y: y2) let p3 = CGPoint(x: cpx2, y: cpy2) let d1 = p1.deltaTo(p0).length() let d2 = p2.deltaTo(p1).length() let d3 = p3.deltaTo(p2).length() var b1 = p2.multiplyBy(pow(d1, 2 * alpha)) b1 = b1.deltaTo(p0.multiplyBy(pow(d2, 2 * alpha))) b1 = b1.addTo(p1.multiplyBy(2 * pow(d1, 2 * alpha) + 3 * pow(d1, alpha) * pow(d2, alpha) + pow(d2, 2 * alpha))) b1 = b1.multiplyBy(1.0 / (3 * pow(d1, alpha) * (pow(d1, alpha) + pow(d2, alpha)))) var b2 = p1.multiplyBy(pow(d3, 2 * alpha)) b2 = b2.deltaTo(p3.multiplyBy(pow(d2, 2 * alpha))) b2 = b2.addTo(p2.multiplyBy(2 * pow(d3, 2 * alpha) + 3 * pow(d3, alpha) * pow(d2, alpha) + pow(d2, 2 * alpha))) b2 = b2.multiplyBy(1.0 / (3 * pow(d3, alpha) * (pow(d3, alpha) + pow(d2, alpha)))) return (b1, b2) } private func setGraphicsConfiguration(context: CGContext?) { context?.setFillColor(self.colorComponents.fill.cgColor) context?.setStrokeColor(self.colorComponents.stroke.cgColor) context?.setLineWidth(self.colorComponents.strokeWeight) } private func drawing(mode: CGPathDrawingMode, closure:() -> Void) { let context = self.contextComponents.context context?.saveGState() closure() // do not execute this line when testing to protect path infomation if !isTesting() { context?.drawPath(using: mode) } context?.restoreGState() } private func isTesting() -> Bool { return ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil } } ================================================ FILE: ProcessingKit/Core/Shape/Vertex.swift ================================================ // // Vertex.swift // ProcessingKit // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public enum BeginShapeKind { case points case lines case triangles case quads case none } public enum EndShapeMode { case close case none } public protocol VertexComponentsContract { var vertexes: [CGPoint] { get set } var kind: BeginShapeKind { get set } } public protocol VertexModelContract { mutating func beginShape(_ kind: BeginShapeKind) mutating func endShape(_ mode: EndShapeMode) mutating func vertex(_ x: CGFloat, _ y: CGFloat) } public class VertexComponents: VertexComponentsContract { public var vertexes: [CGPoint] = [] public var kind: BeginShapeKind = .none public init() {} } public struct VertexModel: VertexModelContract { private var contextComponents: ContextComponenetsContract private var vertexComponents: VertexComponentsContract private var colorComponents: ColorComponentsContract public init(contextComponents: ContextComponenetsContract, vertexComponents: VertexComponentsContract, colorComponents: ColorComponentsContract) { self.contextComponents = contextComponents self.vertexComponents = vertexComponents self.colorComponents = colorComponents } public mutating func beginShape(_ kind: BeginShapeKind) { self.vertexComponents.kind = kind self.vertexComponents.vertexes.removeAll() } public mutating func endShape(_ mode: EndShapeMode) { guard self.vertexComponents.vertexes.count > 0 else { return } switch self.vertexComponents.kind { case .points: let context = self.contextComponents.context context?.setFillColor(self.colorComponents.stroke.cgColor) for vertex in self.vertexComponents.vertexes { context?.fill(CGRect(x: vertex.x, y: vertex.y, width: self.colorComponents.strokeWeight, height: self.colorComponents.strokeWeight)) } case .lines: while self.vertexComponents.vertexes.count >= 2 { let arrSlice: ArraySlice = self.vertexComponents.vertexes.prefix(2) let vertexes = arrSlice.map { $0 } addLineToPoints(vertexes: vertexes, isClosed: false) self.vertexComponents.vertexes.removeFirst(2) } case .triangles: while self.vertexComponents.vertexes.count >= 3 { let arrSlice: ArraySlice = self.vertexComponents.vertexes.prefix(3) let vertexes = arrSlice.map { $0 } addLineToPoints(vertexes: vertexes, isClosed: true) self.vertexComponents.vertexes.removeFirst(3) } case .quads: while self.vertexComponents.vertexes.count >= 4 { let arrSlice: ArraySlice = self.vertexComponents.vertexes.prefix(4) let vertexes = arrSlice.map { $0 } addLineToPoints(vertexes: vertexes, isClosed: true) self.vertexComponents.vertexes.removeFirst(4) } case .none: self.addLineToPoints(vertexes: self.vertexComponents.vertexes, isClosed: mode == .close) } self.vertexComponents.vertexes.removeAll() } public mutating func vertex(_ x: CGFloat, _ y: CGFloat) { self.vertexComponents.vertexes.append(CGPoint(x: x, y: y)) } private func addLineToPoints(vertexes: [CGPoint], isClosed: Bool) { let context = self.contextComponents.context setGraphicsConfiguration(context: context) for (index, vertex) in vertexes.enumerated() { if index == 0 { context?.move(to: vertex) } else { context?.addLine(to: vertex) } } if isClosed { context?.addLine(to: vertexes.first!) } context?.drawPath(using: .fillStroke) } private func setGraphicsConfiguration(context: CGContext?) { context?.setFillColor(self.colorComponents.fill.cgColor) context?.setStrokeColor(self.colorComponents.stroke.cgColor) context?.setLineWidth(self.colorComponents.strokeWeight) } } ================================================ FILE: ProcessingKit/Core/Structure/Loop.swift ================================================ // // Structure.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/13. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation public protocol LoopModelContract { func loop() func noLoop() } ================================================ FILE: ProcessingKit/Core/Transform/Transform.swift ================================================ // // Transform.swift // ProcessingKit // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol TransformModelContract { func pushMatrix() func popMatrix() func scale(_ s: CGFloat) func scale(_ x: CGFloat, _ y: CGFloat) func shear(_ angleX: CGFloat, _ angleY: CGFloat) func rotate(_ angle: CGFloat) func translate(_ x: CGFloat, _ y: CGFloat) } public struct TransformModel: TransformModelContract { private var contextComponents: ContextComponenetsContract public init(contextComponents: ContextComponenetsContract) { self.contextComponents = contextComponents } public func pushMatrix() { let context = self.contextComponents.context context?.saveGState() } public func popMatrix() { let context = self.contextComponents.context context?.restoreGState() } public func scale(_ s: CGFloat) { let context = self.contextComponents.context context?.scaleBy(x: s, y: s) } public func scale(_ x: CGFloat, _ y: CGFloat) { let context = self.contextComponents.context context?.scaleBy(x: x, y: y) } public func shear(_ angleX: CGFloat, _ angleY: CGFloat) { let context = self.contextComponents.context context?.concatenate(CGAffineTransform(a: 1, b: tan(angleY), c: tan(angleX), d: 1, tx: 0, ty: 0)) } public func rotate(_ angle: CGFloat) { let context = self.contextComponents.context context?.rotate(by: angle) } public func translate(_ x: CGFloat, _ y: CGFloat) { let context = self.contextComponents.context context?.translateBy(x: x, y: y) } } ================================================ FILE: ProcessingKit/Core/Typography/Text.swift ================================================ // // Text.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/13. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif public protocol TextComponentsContract { var textSize: CGFloat { get set } var textFont: UIFont { get set } var textAlignX: NSTextAlignment { get set } } public protocol TextModelContract { func text(_ str: String, _ x: CGFloat, _ y: CGFloat) func text(_ str: String, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) func textWidth(_ str: String) -> CGFloat mutating func textSize(_ size: CGFloat) mutating func textFont(_ font: UIFont) mutating func textAlign(_ allignX: NSTextAlignment) } public class TextComponents: TextComponentsContract { public var textSize: CGFloat = 20.0 public var textFont: UIFont = UIFont.systemFont(ofSize: 20.0) public var textAlignX: NSTextAlignment = .left public init() {} } public struct TextModel: TextModelContract { private var contextComponents: ContextComponenetsContract private var textComponents: TextComponentsContract private var colorComponents: ColorComponentsContract private var frameComponents: FrameComponentsContract public init(contextComponents: ContextComponenetsContract, frameComponents: FrameComponentsContract, textComponents: TextComponentsContract, colorComponents: ColorComponentsContract) { self.contextComponents = contextComponents self.frameComponents = frameComponents self.textComponents = textComponents self.colorComponents = colorComponents } public func text(_ str: String, _ x: CGFloat, _ y: CGFloat) { let width = self.textWidth(str) let height = str.height(withConstrainedWidth: width, font: self.textComponents.textFont) if self.textComponents.textAlignX == .center { self.text(str, x - width / 2, y, width, height) return } else if self.textComponents.textAlignX == .right { self.text(str, x - width, y, width, height) return } self.text(str, x, y, width, height) } public func text(_ str: String, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { let context = self.contextComponents.context context?.saveGState() context?.translateBy(x: 0, y: frameComponents.bounds.size.height) context?.scaleBy(x: 1.0, y: -1.0) context?.textMatrix = CGAffineTransform.identity let path: CGMutablePath = CGMutablePath() let bounds: CGRect = CGRect(x: x, y: -y + frameComponents.bounds.size.height, width: width, height: height) path.addRect(bounds) let paragraph = NSMutableParagraphStyle() paragraph.alignment = self.textComponents.textAlignX let attributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.paragraphStyle: paragraph] let attrString = NSMutableAttributedString(string: str, attributes: attributes) // set font CFAttributedStringSetAttribute(attrString, CFRangeMake(0, attrString.length), kCTFontAttributeName, self.textComponents.textFont) CFAttributedStringSetAttribute(attrString, CFRangeMake(0, attrString.length), kCTForegroundColorAttributeName, self.colorComponents.fill.cgColor) let framesetter: CTFramesetter = CTFramesetterCreateWithAttributedString(attrString) let frame: CTFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, 0), path, nil) // 上記の内容を描画します。 CTFrameDraw(frame, context!) context?.restoreGState() } public func textWidth(_ str: String) -> CGFloat { let size = str.size(withAttributes: [NSAttributedString.Key.font: self.textComponents.textFont]) return size.width } public mutating func textSize(_ size: CGFloat) { self.textComponents.textSize = size self.textComponents.textFont = UIFont.systemFont(ofSize: size) } public mutating func textFont(_ font: UIFont) { self.textComponents.textFont = font self.textComponents.textSize = font.pointSize } public mutating func textAlign(_ allignX: NSTextAlignment) { self.textComponents.textAlignX = allignX } } ================================================ FILE: ProcessingKit/Demo.playground/Contents.swift ================================================ //: Playground - noun: a place where people can play import UIKit import PlaygroundSupport import ProcessingKit //: Step 1: Create custom view class for drawing class SampleView: ProcessingView { var i: CGFloat = 0 var dx: CGFloat = 0 //: The setup() function is run once, when the program starts. func setup() { dx = 10 } //: Called directly after setup(), the draw() function continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called. func draw() { background(UIColor.white) fill(UIColor.red) ellipse(i, 100, 100, 100) i+=dx if i > width { i = 0 } } } //: Step 2: Create custom view instance let sampleView = SampleView(frame: CGRect(x: 0, y: 0, width: 360, height: 480)) //: Option for playground sampleView.isPlayground = true PlaygroundPage.current.needsIndefiniteExecution = true PlaygroundPage.current.liveView = sampleView ================================================ FILE: ProcessingKit/Demo.playground/contents.xcplayground ================================================ ================================================ FILE: ProcessingKit/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass ================================================ FILE: ProcessingKit/ProcessingKit.h ================================================ // // ProcessingKit.h // ProcessingKit // // Created by AtsuyaSato on 2017/08/04. // Copyright © 2017年 Atsuya Sato. All rights reserved. // #import //! Project version number for ProcessingKit. FOUNDATION_EXPORT double ProcessingKitVersionNumber; //! Project version string for ProcessingKit. FOUNDATION_EXPORT const unsigned char ProcessingKitVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Color.swift ================================================ // // ProcessingView+Color.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: ColorModelContract { public func background(_ color: UIColor) { self.colorModel.background(color) self.backgroundColor = color } public func background(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat = 255) { self.colorModel.background(r, g, b, a) self.backgroundColor = UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a / 255.0) } public func clear() { self.colorModel.clear() self.background(UIColor.white) } public func fill(_ color: UIColor) { self.colorModel.fill(color) } public func fill(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat = 255) { self.colorModel.fill(r, g, b, a) } public func stroke(_ color: UIColor) { self.colorModel.stroke(color) } public func stroke(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat = 255) { self.colorModel.stroke(r, g, b, a) } public func strokeWeight(_ weight: CGFloat) { self.colorModel.strokeWeight(weight) } public func noFill() { self.colorModel.noFill() } public func noStroke() { self.colorModel.noStroke() } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Constants.swift ================================================ // // ProcessingView+Constants.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: Constants { public var HALF_PI: CGFloat { return .pi / 2 } public var PI: CGFloat { return .pi } public var QUARTER_PI: CGFloat { return .pi / 4 } public var TAU: CGFloat { return self.TWO_PI } public var TWO_PI: CGFloat { return .pi * 2 } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Date.swift ================================================ // // ProcessingView+Date.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: DateModelContract { public func millis() -> Int { return self.dateModel.millis() } public func second() -> Int { return self.dateModel.second() } public func minute() -> Int { return self.dateModel.minute() } public func hour() -> Int { return self.dateModel.hour() } public func day() -> Int { return self.dateModel.day() } public func month() -> Int { return self.dateModel.month() } public func year() -> Int { return self.dateModel.year() } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Frame.swift ================================================ // // ProcessingView+Frame.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: FrameModelContract { public var frameRate: CGFloat { return self.frameModel.frameRate } public var width: CGFloat { return self.frameModel.width } public var height: CGFloat { return self.frameModel.height } public func frameRate(_ fps: CGFloat) { self.frameModel.frameRate(fps) self.timer?.invalidate() self.timer = nil self.timer = Timer.scheduledTimer(timeInterval: TimeInterval(1.0 / fps), target: self, selector: #selector(update(timer:)), userInfo: nil, repeats: true) } public func delay(napTime: Int) { let delayInSeconds = Double(napTime) / 1000.0 self.timer?.invalidate() DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delayInSeconds) { self.timer?.fire() } } @objc private func update(timer: Timer) { self.draw(self.frame) } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Gesture.swift ================================================ // // ProcessingView+Gesture.swift // ProcessingKit // // Created by AtsuyaSato on 2018/10/07. // Copyright © 2018 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView { #if os(iOS) public var fingerPressed: Bool { return self.gestureModel.fingerPressed } public var touchX: CGFloat { return self.gestureModel.touchX } public var touchY: CGFloat { return self.gestureModel.touchY } public var touches: Set { return self.gestureModel.touches } #elseif os(OSX) public var mousePressed: Bool { return self.gestureModel.mousePressed } public var mouseX: CGFloat { return self.gestureModel.mouseX } public var mouseY: CGFloat { return self.gestureModel.mouseY } #endif #if os(iOS) @objc func didTap(recognizer: UITapGestureRecognizer) { self.gestureModel.didTap(recognizer: recognizer) let dispatchTime = DispatchTime.now() + Double(1.0 / self.frameRate) DispatchQueue.main.asyncAfter(deadline: dispatchTime) { self.didTapExit(recognizer: recognizer) } } func didTapExit(recognizer: UITapGestureRecognizer) { self.gestureModel.didTapExit(recognizer: recognizer) } @objc func didSwipe(recognizer: UISwipeGestureRecognizer) { self.gestureModel.didSwipe(recognizer: recognizer) } @objc func didPinch(recognizer: UIPinchGestureRecognizer) { self.gestureModel.didPinch(recognizer: recognizer) } @objc func didRotate(recognizer: UIRotationGestureRecognizer) { self.gestureModel.didRotate(recognizer: recognizer) } @objc func didPan(recognizer: UIPanGestureRecognizer) { self.gestureModel.didPan(recognizer: recognizer) } @objc func didLongPress(recognizer: UILongPressGestureRecognizer) { self.gestureModel.didLongPress(recognizer: recognizer) } #elseif os(OSX) @objc func didClick(recognizer: NSClickGestureRecognizer) { self.gestureModel.didClick(recognizer: recognizer) let dispatchTime = DispatchTime.now() + Double(1.0 / self.frameRate) DispatchQueue.main.asyncAfter(deadline: dispatchTime) { self.didClickExit(recognizer: recognizer) } } @objc func didClickExit(recognizer: NSClickGestureRecognizer) { self.gestureModel.didClickExit(recognizer: recognizer) } @objc func didMagnify(recognizer: NSMagnificationGestureRecognizer) { self.gestureModel.didMagnify(recognizer: recognizer) } @objc func didPan(recognizer: NSPanGestureRecognizer) { self.gestureModel.didPan(recognizer: recognizer) } @objc func didPress(recognizer: NSPressGestureRecognizer) { self.gestureModel.didPress(recognizer: recognizer) } @objc func didRotate(recognizer: NSRotationGestureRecognizer) { self.gestureModel.didRotate(recognizer: recognizer) } open override func scrollWheel(with event: NSEvent) { self.gestureModel.scrollWheel(with: event) } open override func mouseMoved(with event: NSEvent) { self.gestureModel.mouseMoved(with: event) } #endif } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Image.swift ================================================ // // ProcessingView+Image.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: ImageModelContract { #if os(iOS) public func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat) { self.imageModel.image(img, x, y) } public func image(_ img: UIImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { self.imageModel.image(img, x, y, width, height) } #elseif os(OSX) public func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat) { self.imageModel.drawImage(img, x, y) } public func drawImage(_ img: NSImage, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { self.imageModel.drawImage(img, x, y, width, height) } #endif } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Loop.swift ================================================ // // ProcessingView+Loop.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: LoopModelContract { public func loop() { self.timer?.fire() } public func noLoop() { self.timer?.invalidate() self.timer = nil } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Shape.swift ================================================ // // ProcessingView+Shape.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: ShapeModelContract { public func point(_ x: CGFloat, _ y: CGFloat) { self.shapeModel.point(x, y) } public func line(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat) { self.shapeModel.line(x1, y1, x2, y2) } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { self.shapeModel.rect(x, y, width, height) } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ radius: CGFloat) { self.shapeModel.rect(x, y, width, height, radius) } public func rect(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat, _ topLeftRadius: CGFloat, _ topRightRadius: CGFloat, _ bottomLeftRadius: CGFloat, _ bottomRightRadius: CGFloat) { self.shapeModel.rect(x, y, width, height, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius) } public func ellipse(_ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { self.shapeModel.ellipse(x, y, width, height) } public func arc(_ x: CGFloat, _ y: CGFloat, _ radius: CGFloat, _ start: CGFloat, _ stop: CGFloat) { self.shapeModel.arc(x, y, radius, start, stop) } public func triangle(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat) { self.shapeModel.triangle(x1, y1, x2, y2, x3, y3) } public func quad(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ x3: CGFloat, _ y3: CGFloat, _ x4: CGFloat, _ y4: CGFloat) { self.shapeModel.quad(x1, y1, x2, y2, x3, y3, x4, y4) } public func curve(_ cpx1: CGFloat, _ cpy1: CGFloat, _ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat) { self.shapeModel.curve(cpx1, cpy1, x1, y1, x2, y2, cpx2, cpy2) } public func bezier(_ x1: CGFloat, _ y1: CGFloat, _ cpx1: CGFloat, _ cpy1: CGFloat, _ cpx2: CGFloat, _ cpy2: CGFloat, _ x2: CGFloat, _ y2: CGFloat) { self.shapeModel.bezier(x1, y1, cpx1, cpy1, cpx2, cpy2, x2, y2) } public func radians(_ degrees: CGFloat) -> CGFloat { return self.shapeModel.radians(degrees) } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Text.swift ================================================ // // ProcessingView+Text.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: TextModelContract { public func text(_ str: String, _ x: CGFloat, _ y: CGFloat) { self.textModel.text(str, x, y) } public func text(_ str: String, _ x: CGFloat, _ y: CGFloat, _ width: CGFloat, _ height: CGFloat) { self.textModel.text(str, x, y, width, height) } public func textWidth(_ str: String) -> CGFloat { return self.textModel.textWidth(str) } public func textSize(_ size: CGFloat) { self.textModel.textSize(size) } public func textFont(_ font: UIFont) { self.textModel.textFont(font) } public func textAlign(_ allignX: NSTextAlignment) { self.textModel.textAlign(allignX) } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Transform.swift ================================================ // // ProcessingView+Transform.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: TransformModelContract { public func pushMatrix() { self.transformModel.pushMatrix() } public func popMatrix() { self.transformModel.popMatrix() } public func scale(_ s: CGFloat) { self.transformModel.scale(s) } public func scale(_ x: CGFloat, _ y: CGFloat) { self.transformModel.scale(x, y) } public func shear(_ angleX: CGFloat, _ angleY: CGFloat) { self.transformModel.shear(angleX, angleY) } public func rotate(_ angle: CGFloat) { self.transformModel.rotate(angle) } public func translate(_ x: CGFloat, _ y: CGFloat) { self.transformModel.translate(x, y) } } ================================================ FILE: ProcessingKit/ProcessingView+Core/ProcessingView+Vertex.swift ================================================ // // ProcessingView+Vertex.swift // ProcessingKit // // Created by AtsuyaSato on 2018/09/09. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif extension ProcessingView: VertexModelContract { public func beginShape(_ kind: BeginShapeKind = .none) { self.vertexModel.beginShape(kind) } public func endShape(_ mode: EndShapeMode = .none) { self.vertexModel.endShape(mode) } public func vertex(_ x: CGFloat, _ y: CGFloat) { self.vertexModel.vertex(x, y) } } ================================================ FILE: ProcessingKit/ProcessingView.swift ================================================ // // ProcessingView.swift // ProcessingKit // // Created by AtsuyaSato on 2017/08/05. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif @objc public protocol ProcessingViewDelegate { @objc optional func setup() @objc optional func draw() } @objc public protocol ProcessingViewGestureDelegate { #if os(iOS) @objc optional func didTap() @objc optional func didRelease() @objc optional func didDrag() //Pan @objc optional func didSwipe(direction: UISwipeGestureRecognizer.Direction) @objc optional func didPinch(scale: CGFloat, velocity: CGFloat) @objc optional func didRotate(rotation: CGFloat, velocity: CGFloat) @objc optional func didLongPress() #elseif os(OSX) @objc optional func didClick() @objc optional func didRelease() @objc optional func didDrag() @objc optional func didMove() @objc optional func didMagnify(magnification: CGFloat) @objc optional func didRotate(rotation: CGFloat, inDegrees: CGFloat) @objc optional func didPress() @objc optional func didScroll(x: CGFloat, y: CGFloat) #endif } open class ProcessingView: UIImageView { public weak var delegate: ProcessingViewDelegate? public weak var gesture: ProcessingViewGestureDelegate? public var autoRelease = true public var isPlayground = false // MARK: Internal properties lazy var frameModel: FrameModelContract = { return FrameModel( frameComponents: self.frameComponents, timer: self.timer ) }() lazy var shapeModel: ShapeModelContract = { return ShapeModel( contextComponents: self.contextComponents, colorComponents: self.colorComponents ) }() lazy var vertexModel: VertexModelContract = { return VertexModel( contextComponents: self.contextComponents, vertexComponents: self.vertexComponents, colorComponents: self.colorComponents ) }() lazy var gestureModel: GestureModelContract = { return GestureModel( gestureComponents: self.gestureComponents, frameComponents: self.frameComponents ) }() lazy var dateModel: DateModelContract = { return DateModel(startDate: Date()) }() lazy var colorModel: ColorModelContract = { return ColorModel( contextComponents: self.contextComponents, colorComponents: self.colorComponents, frameComponents: self.frameComponents ) }() lazy var textModel: TextModelContract = { return TextModel( contextComponents: self.contextComponents, frameComponents: self.frameComponents, textComponents: self.textComponents, colorComponents: self.colorComponents ) }() lazy var imageModel: ImageModelContract = { return ImageModel(contextComponents: self.contextComponents) }() lazy var transformModel: TransformModelContract = { return TransformModel(contextComponents: self.contextComponents) }() var timer: Timer? // MARK: Gesture Recognizers #if os(iOS) lazy var tapGestureWithSingleTouch: UITapGestureRecognizer = { let recognizer = UITapGestureRecognizer(target: self, action: #selector(didTap(recognizer:))) recognizer.numberOfTouchesRequired = 1 return recognizer }() lazy var tapGestureWithDoubleTouch: UITapGestureRecognizer = { let recognizer = UITapGestureRecognizer(target: self, action: #selector(didTap(recognizer:))) recognizer.numberOfTouchesRequired = 2 return recognizer }() lazy var tapGestureWithTripleTouch: UITapGestureRecognizer = { let recognizer = UITapGestureRecognizer(target: self, action: #selector(didTap(recognizer:))) recognizer.numberOfTouchesRequired = 3 return recognizer }() lazy var tapGestureWithQuadTouch: UITapGestureRecognizer = { let recognizer = UITapGestureRecognizer(target: self, action: #selector(didTap(recognizer:))) recognizer.numberOfTouchesRequired = 4 return recognizer }() lazy var tapGestureWithQuintTouch: UITapGestureRecognizer = { let recognizer = UITapGestureRecognizer(target: self, action: #selector(didTap(recognizer:))) recognizer.numberOfTouchesRequired = 5 return recognizer }() lazy var swipeUpGesture: UISwipeGestureRecognizer = { let recognizer = UISwipeGestureRecognizer(target: self, action: #selector(didSwipe(recognizer:))) recognizer.direction = .up return recognizer }() lazy var swipeDownGesture: UISwipeGestureRecognizer = { let recognizer = UISwipeGestureRecognizer(target: self, action: #selector(didSwipe(recognizer:))) recognizer.direction = .down return recognizer }() lazy var swipeLeftGesture: UISwipeGestureRecognizer = { let recognizer = UISwipeGestureRecognizer(target: self, action: #selector(didSwipe(recognizer:))) recognizer.direction = .left return recognizer }() lazy var swipeRightGesture: UISwipeGestureRecognizer = { let recognizer = UISwipeGestureRecognizer(target: self, action: #selector(didSwipe(recognizer:))) recognizer.direction = .right return recognizer }() lazy var pinchGesture: UIPinchGestureRecognizer = { let pinch = UIPinchGestureRecognizer(target: self, action: #selector(didPinch(recognizer:))) return pinch }() lazy var panGesture: UIPanGestureRecognizer = { return UIPanGestureRecognizer(target: self, action: #selector(didPan(recognizer:))) }() lazy var rotationGesture: UIRotationGestureRecognizer = { let rotate = UIRotationGestureRecognizer(target: self, action: #selector(didRotate(recognizer:))) return rotate }() lazy var longPressGesture: UILongPressGestureRecognizer = { return UILongPressGestureRecognizer(target: self, action: #selector(didLongPress(recognizer:))) }() #elseif os(OSX) lazy var clickGesture: NSClickGestureRecognizer = { return NSClickGestureRecognizer(target: self, action: #selector(didClick(recognizer:))) }() lazy var magnificationGesture: NSMagnificationGestureRecognizer = { return NSMagnificationGestureRecognizer(target: self, action: #selector(didMagnify(recognizer:))) }() lazy var panGesture: NSPanGestureRecognizer = { return NSPanGestureRecognizer(target: self, action: #selector(didPan(recognizer:))) }() lazy var pressGesture: NSPressGestureRecognizer = { return NSPressGestureRecognizer(target: self, action: #selector(didPress(recognizer:))) }() lazy var rotationGesture: NSRotationGestureRecognizer = { return NSRotationGestureRecognizer(target: self, action: #selector(didRotate(recognizer:))) }() #endif // MARK: Private properties private var contextComponents = ContextComponents() private var colorComponents = ColorComponents() private var gestureComponents = GestureComponents() private var vertexComponents = VertexComponents() private var textComponents = TextComponents() private var frameComponents = FrameComponents() // Flag for setup function (setup function execute only once) private var firstcall = true // Store trackingArea for calling mouseMove #if os(OSX) private var trackingArea: NSTrackingArea? #endif // MARK: - Initializer public init() { super.init(frame: CGRect.zero) self.commonInit() } public required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.commonInit() } public override init(frame: CGRect) { super.init(frame: frame) self.commonInit() } private func commonInit() { self.configuration() self.run() self.addGestureRecognizers() } private func configuration() { #if os(iOS) self.isUserInteractionEnabled = true #elseif os(OSX) if let window = self.window { self.bounds = CGRect(x: 0, y: 0, width: window.frame.size.width, height: window.frame.size.height) } else { self.bounds = CGRect.zero } #endif self.delegate = self self.gesture = self } func addGestureRecognizers() { #if os(iOS) tapGestureWithSingleTouch.delegate = self tapGestureWithDoubleTouch.delegate = self tapGestureWithTripleTouch.delegate = self tapGestureWithQuadTouch.delegate = self tapGestureWithQuintTouch.delegate = self panGesture.delegate = self swipeUpGesture.delegate = self swipeDownGesture.delegate = self swipeLeftGesture.delegate = self swipeRightGesture.delegate = self pinchGesture.delegate = self rotationGesture.delegate = self longPressGesture.delegate = self self.addGestureRecognizer(tapGestureWithSingleTouch) self.addGestureRecognizer(tapGestureWithDoubleTouch) self.addGestureRecognizer(tapGestureWithTripleTouch) self.addGestureRecognizer(tapGestureWithQuadTouch) self.addGestureRecognizer(tapGestureWithQuintTouch) self.addGestureRecognizer(panGesture) self.addGestureRecognizer(swipeUpGesture) self.addGestureRecognizer(swipeDownGesture) self.addGestureRecognizer(swipeLeftGesture) self.addGestureRecognizer(swipeRightGesture) self.addGestureRecognizer(pinchGesture) self.addGestureRecognizer(rotationGesture) self.addGestureRecognizer(longPressGesture) #elseif os(OSX) self.addGestureRecognizer(clickGesture) self.addGestureRecognizer(magnificationGesture) self.addGestureRecognizer(panGesture) self.addGestureRecognizer(pressGesture) self.addGestureRecognizer(rotationGesture) #endif } private func run() { self.frameRate(60.0) } private func parentViewController() -> UIViewController? { var parentResponder: UIResponder? = self while true { #if os(iOS) guard let nextResponder = parentResponder?.next else { return nil } #else guard let nextResponder = parentResponder?.nextResponder else { return nil } #endif if let viewController = nextResponder as? UIViewController { return viewController } parentResponder = nextResponder } } // MARK: - Notifications @objc private func suspend(notification: NSNotification) { self.noLoop() } @objc private func resume(notification: NSNotification) { self.loop() } // MARK: - Override Methods open override func draw(_ rect: CGRect) { #if os(iOS) UIGraphicsBeginImageContext(rect.size) self.image?.draw(at: CGPoint.zero) #elseif os(OSX) self.image?.draw(at: NSPoint.zero, from: NSRect.zero, operation: .copy, fraction: 1.0) // MARK: Coordinate systems are different between iOS and OS X let context = contextComponents.context context?.saveGState() context?.translateBy(x: 0.0, y: height) context?.scaleBy(x: 1.0, y: -1.0) #endif // Setup if firstcall { self.firstcall = false self.delegate?.setup?() } // Gesture events self.callDelegatesIfNeeded() // Draw self.frameComponents.frameCount += 1 self.delegate?.draw?() #if os(iOS) let drawnImage = UIGraphicsGetImageFromCurrentImageContext() self.image = drawnImage UIGraphicsEndImageContext() #elseif os(OSX) if let cgImage = NSGraphicsContext.current?.cgContext.makeImage() { DispatchQueue.main.async { self.image = NSImage(cgImage: cgImage, size: self.frame.size) self.setNeedsDisplay() } } context?.restoreGState() #endif // Only setup if self.delegate?.draw == nil { self.noLoop() return } // Deallocate timer if self.parentViewController() == nil { if autoRelease == true && isPlayground == false { self.noLoop() } } } // MARK: - Update view bounds open override var frame: CGRect { didSet { frameComponents.frame = self.frame frameComponents.bounds = self.bounds } } open override var bounds: CGRect { didSet { if frameComponents.frame != self.frame { frameComponents.frame = CGRect(x: frameComponents.frame.origin.x, y: frameComponents.frame.origin.y, width: self.frame.width, height: self.frame.height) frameComponents.bounds = self.bounds } } } private func callDelegatesIfNeeded() { for event in self.gestureComponents.delegateEvents { sendDelegate(event: event) } self.gestureComponents.delegateEvents.removeAll() } #if os(iOS) private func sendDelegate(event: GestureEvent) { switch event { case .didTap: self.gesture?.didTap?() case .didRelease: self.gesture?.didRelease?() case .didDrag: self.gesture?.didDrag?() case .didSwipe(let direction): self.gesture?.didSwipe?(direction: direction) case .didPinch(let scale, let velocity): self.gesture?.didPinch?(scale: scale, velocity: velocity) case .didRotate(let rotation, let velocity): self.gesture?.didRotate?(rotation: rotation, velocity: velocity) case .didLongPress: self.gesture?.didLongPress?() } } #elseif os(OSX) private func sendDelegate(event: GestureEvent) { switch event { case .didClick: self.gesture?.didClick?() case .didRelease: self.gesture?.didRelease?() case .didDrag: self.gesture?.didDrag?() case .didMove: self.gesture?.didMove?() case .didMagnify(let magnification): self.gesture?.didMagnify?(magnification: magnification) case .didRotate(let rotation, let inDegrees): self.gesture?.didRotate?(rotation: rotation, inDegrees: inDegrees) case .didPress: self.gesture?.didPress?() case .didScroll(let x, let y): self.gesture?.didScroll?(x: x, y: y) } } #endif // MARK: - deinit deinit { self.timer?.invalidate() self.timer = nil } } extension ProcessingView: ProcessingViewGestureDelegate {} extension ProcessingView: ProcessingViewDelegate {} #if os(iOS) extension ProcessingView: UIGestureRecognizerDelegate { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } } #endif #if os(OSX) extension ProcessingView { override open func updateTrackingAreas() { if trackingArea != nil { self.removeTrackingArea(trackingArea!) } let options: NSTrackingArea.Options = [.mouseEnteredAndExited, .mouseMoved, .activeInKeyWindow] trackingArea = NSTrackingArea(rect: self.bounds, options: options, owner: self, userInfo: nil) self.addTrackingArea(trackingArea!) } } #endif ================================================ FILE: ProcessingKit.podspec ================================================ Pod::Spec.new do |s| s.name = "ProcessingKit" s.version = "1.5.0" s.summary = "Visual Designing library for iOS." s.description = <<-DESC ProcessingKit is a Visual Designing library for iOS. ProcessingKit written in Swift🐧 and you can write like processing. DESC s.homepage = "https://github.com/natmark/ProcessingKit" s.screenshots = "https://github.com/natmark/ProcessingKit/raw/master/Resources/ProcessingKit-Header.png?raw=true" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Atsuya Sato" => "natmark0918@gmail.com" } s.osx.deployment_target = "10.11" s.ios.deployment_target = "10.0" s.source = { :git => "https://github.com/natmark/ProcessingKit.git", :tag => "#{s.version}" } s.source_files = "ProcessingKit/**/*.swift" s.exclude_files = "ProcessingKit/Demo.playground/*" s.ios.exclude_files = "ProcessingKit/Core/Extensions/NSImage.swift", "ProcessingKit/Core/Extensions/NSView.swift" s.requires_arc = true s.subspec "Core" do |subspec| subspec.source_files = "ProcessingKit/Core/**/*.swift" subspec.ios.exclude_files = "ProcessingKit/Core/Extensions/NSImage.swift", "ProcessingKit/Core/Extensions/NSView.swift" end end ================================================ FILE: ProcessingKit.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ E7054AD41F34CCB200EA0C0F /* ProcessingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054AD31F34CCB200EA0C0F /* ProcessingView.swift */; }; E71388DD1F7A1F5500A45FA6 /* ProcessingViewDelegateSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E71388DC1F7A1F5500A45FA6 /* ProcessingViewDelegateSpy.swift */; }; E7212F4A1F34B5A600173CD8 /* ProcessingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7212F401F34B5A600173CD8 /* ProcessingKit.framework */; }; E7212F4F1F34B5A600173CD8 /* ProcessingViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7212F4E1F34B5A600173CD8 /* ProcessingViewTests.swift */; }; E7212F511F34B5A600173CD8 /* ProcessingKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E7212F431F34B5A600173CD8 /* ProcessingKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; E768201C1F7B38BC009E8FD2 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E768201B1F7B38BC009E8FD2 /* DateTests.swift */; }; E777BB8E220312DC0086AC53 /* CGPath+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E777BB8D220312DC0086AC53 /* CGPath+Extension.swift */; }; E7B2F66221454010003B642A /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */; }; E7B2F66321454010003B642A /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDA81F44656E006BAC6A /* Image.swift */; }; E7B2F66421454010003B642A /* Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68F1F40937100E0372D /* Frame.swift */; }; E7B2F66521454010003B642A /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E231FF7E30C00CE691A /* Context.swift */; }; E7B2F66721454010003B642A /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7387A481F44828F00C3B35C /* String.swift */; }; E7B2F66821454010003B642A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68B1F40902A00E0372D /* Color.swift */; }; E7B2F66921454010003B642A /* Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046B71F4088FB00921B1A /* Loop.swift */; }; E7B2F66A21454010003B642A /* Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820201F7B6446009E8FD2 /* Vertex.swift */; }; E7B2F66B21454010003B642A /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713695F1F44945900267715 /* UIColor.swift */; }; E7B2F66D21454010003B642A /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820231F7B647A009E8FD2 /* Transform.swift */; }; E7B2F66E21454010003B642A /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB6881F408FAB00E0372D /* Text.swift */; }; E7B2F66F21454010003B642A /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820181F7B32B8009E8FD2 /* Date.swift */; }; E7B2F67021454010003B642A /* CGPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DCC1FF7D30500CE691A /* CGPoint.swift */; }; E7B2F67121454010003B642A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046C01F408B2E00921B1A /* Constants.swift */; }; E7B2F6852145447B003B642A /* ProcessingView+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F6842145447B003B642A /* ProcessingView+Color.swift */; }; E7B2F687214544A8003B642A /* ProcessingView+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F686214544A8003B642A /* ProcessingView+Constants.swift */; }; E7B2F689214544C7003B642A /* ProcessingView+Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F688214544C6003B642A /* ProcessingView+Frame.swift */; }; E7B2F68B214544EB003B642A /* ProcessingView+Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F68A214544EB003B642A /* ProcessingView+Image.swift */; }; E7B2F68D2145450A003B642A /* ProcessingView+Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F68C2145450A003B642A /* ProcessingView+Date.swift */; }; E7B2F6912145453B003B642A /* ProcessingView+Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F6902145453B003B642A /* ProcessingView+Shape.swift */; }; E7B2F69321454547003B642A /* ProcessingView+Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69221454547003B642A /* ProcessingView+Vertex.swift */; }; E7B2F69521454577003B642A /* ProcessingView+Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69421454577003B642A /* ProcessingView+Loop.swift */; }; E7B2F69721454591003B642A /* ProcessingView+Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69621454591003B642A /* ProcessingView+Transform.swift */; }; E7B2F699214545B4003B642A /* ProcessingView+Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F698214545B4003B642A /* ProcessingView+Text.swift */; }; E7B2F69F21454F80003B642A /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E231FF7E30C00CE691A /* Context.swift */; }; E7B2F6A021454F83003B642A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68B1F40902A00E0372D /* Color.swift */; }; E7B2F6A121454F86003B642A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046C01F408B2E00921B1A /* Constants.swift */; }; E7B2F6A221454F8B003B642A /* Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68F1F40937100E0372D /* Frame.swift */; }; E7B2F6A321454F8E003B642A /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7387A481F44828F00C3B35C /* String.swift */; }; E7B2F6A421454F93003B642A /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713695F1F44945900267715 /* UIColor.swift */; }; E7B2F6A521454F95003B642A /* CGPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DCC1FF7D30500CE691A /* CGPoint.swift */; }; E7B2F6A621454F99003B642A /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDA81F44656E006BAC6A /* Image.swift */; }; E7B2F6A721454F9C003B642A /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820181F7B32B8009E8FD2 /* Date.swift */; }; E7B2F6A921454FA1003B642A /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */; }; E7B2F6AA21454FA3003B642A /* Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820201F7B6446009E8FD2 /* Vertex.swift */; }; E7B2F6AB21454FA6003B642A /* Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046B71F4088FB00921B1A /* Loop.swift */; }; E7B2F6AC21454FA8003B642A /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820231F7B647A009E8FD2 /* Transform.swift */; }; E7B2F6AD21454FAB003B642A /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB6881F408FAB00E0372D /* Text.swift */; }; E7B2F6B221454FC9003B642A /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E291FF7EBFF00CE691A /* NSImage.swift */; }; E7B2F6B321454FC9003B642A /* NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E2C1FF7F19700CE691A /* NSView.swift */; }; E7B2F6B421454FDE003B642A /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E231FF7E30C00CE691A /* Context.swift */; }; E7B2F6B521454FE0003B642A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68B1F40902A00E0372D /* Color.swift */; }; E7B2F6B621454FE3003B642A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046C01F408B2E00921B1A /* Constants.swift */; }; E7B2F6B721454FE5003B642A /* Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68F1F40937100E0372D /* Frame.swift */; }; E7B2F6B821454FE9003B642A /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7387A481F44828F00C3B35C /* String.swift */; }; E7B2F6B921454FE9003B642A /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713695F1F44945900267715 /* UIColor.swift */; }; E7B2F6BA21454FE9003B642A /* CGPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DCC1FF7D30500CE691A /* CGPoint.swift */; }; E7B2F6BB21454FF9003B642A /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDA81F44656E006BAC6A /* Image.swift */; }; E7B2F6BC21454FF9003B642A /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820181F7B32B8009E8FD2 /* Date.swift */; }; E7B2F6BE21454FF9003B642A /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */; }; E7B2F6BF21454FF9003B642A /* Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820201F7B6446009E8FD2 /* Vertex.swift */; }; E7B2F6C021454FF9003B642A /* Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046B71F4088FB00921B1A /* Loop.swift */; }; E7B2F6C121454FF9003B642A /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820231F7B647A009E8FD2 /* Transform.swift */; }; E7B2F6C221454FF9003B642A /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB6881F408FAB00E0372D /* Text.swift */; }; E7B2F6C321455079003B642A /* ProcessingView+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F6842145447B003B642A /* ProcessingView+Color.swift */; }; E7B2F6C421455079003B642A /* ProcessingView+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F686214544A8003B642A /* ProcessingView+Constants.swift */; }; E7B2F6C521455079003B642A /* ProcessingView+Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F688214544C6003B642A /* ProcessingView+Frame.swift */; }; E7B2F6C621455079003B642A /* ProcessingView+Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F68A214544EB003B642A /* ProcessingView+Image.swift */; }; E7B2F6C721455079003B642A /* ProcessingView+Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F68C2145450A003B642A /* ProcessingView+Date.swift */; }; E7B2F6C921455079003B642A /* ProcessingView+Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F6902145453B003B642A /* ProcessingView+Shape.swift */; }; E7B2F6CA21455079003B642A /* ProcessingView+Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69221454547003B642A /* ProcessingView+Vertex.swift */; }; E7B2F6CB21455079003B642A /* ProcessingView+Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69421454577003B642A /* ProcessingView+Loop.swift */; }; E7B2F6CC21455079003B642A /* ProcessingView+Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F69621454591003B642A /* ProcessingView+Transform.swift */; }; E7B2F6CD21455079003B642A /* ProcessingView+Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B2F698214545B4003B642A /* ProcessingView+Text.swift */; }; E7B2F7122145542F003B642A /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E231FF7E30C00CE691A /* Context.swift */; }; E7B2F71321455437003B642A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68B1F40902A00E0372D /* Color.swift */; }; E7B2F71421455437003B642A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046C01F408B2E00921B1A /* Constants.swift */; }; E7B2F71521455437003B642A /* Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB68F1F40937100E0372D /* Frame.swift */; }; E7B2F71621455437003B642A /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7387A481F44828F00C3B35C /* String.swift */; }; E7B2F71721455437003B642A /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713695F1F44945900267715 /* UIColor.swift */; }; E7B2F71821455437003B642A /* CGPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DCC1FF7D30500CE691A /* CGPoint.swift */; }; E7B2F71921455442003B642A /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E291FF7EBFF00CE691A /* NSImage.swift */; }; E7B2F71A21455442003B642A /* NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77E2C1FF7F19700CE691A /* NSView.swift */; }; E7B2F71B21455448003B642A /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDA81F44656E006BAC6A /* Image.swift */; }; E7B2F71C21455448003B642A /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820181F7B32B8009E8FD2 /* Date.swift */; }; E7B2F71E21455448003B642A /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */; }; E7B2F71F21455448003B642A /* Vertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820201F7B6446009E8FD2 /* Vertex.swift */; }; E7B2F72021455448003B642A /* Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76046B71F4088FB00921B1A /* Loop.swift */; }; E7B2F72121455448003B642A /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820231F7B647A009E8FD2 /* Transform.swift */; }; E7B2F72221455448003B642A /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70BB6881F408FAB00E0372D /* Text.swift */; }; E7B77E221FF7E1B300CE691A /* ProcessingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054AD31F34CCB200EA0C0F /* ProcessingView.swift */; }; E7D14AFB20ED138400906F04 /* GestureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14AFA20ED138400906F04 /* GestureTests.swift */; }; E7D14B4C2169F35A001E152C /* ProcessingView+Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4B2169F35A001E152C /* ProcessingView+Gesture.swift */; }; E7D14B50216A0AEC001E152C /* Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4F216A0AEC001E152C /* Gesture.swift */; }; E7D14B5E216A5A87001E152C /* Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4F216A0AEC001E152C /* Gesture.swift */; }; E7D14B5F216A5A88001E152C /* Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4F216A0AEC001E152C /* Gesture.swift */; }; E7D14B60216A5A89001E152C /* Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4F216A0AEC001E152C /* Gesture.swift */; }; E7D14B61216A5BD6001E152C /* ProcessingView+Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D14B4B2169F35A001E152C /* ProcessingView+Gesture.swift */; }; E7E1830D200A7D0D009C32ED /* TransformTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7E1830C200A7D0D009C32ED /* TransformTests.swift */; }; E7F57866201E26ED0042C30F /* ShapeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7F57865201E26ED0042C30F /* ShapeTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ E7212F4B1F34B5A600173CD8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E7212F371F34B5A600173CD8 /* Project object */; proxyType = 1; remoteGlobalIDString = E7212F3F1F34B5A600173CD8; remoteInfo = ProcessingKit; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ E7054AD31F34CCB200EA0C0F /* ProcessingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ProcessingView.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Shape.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E70BB6881F408FAB00E0372D /* Text.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Text.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E70BB68B1F40902A00E0372D /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Color.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E70BB68F1F40937100E0372D /* Frame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Frame.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E713695F1F44945900267715 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = ""; }; E71388DC1F7A1F5500A45FA6 /* ProcessingViewDelegateSpy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessingViewDelegateSpy.swift; sourceTree = ""; }; E7212F401F34B5A600173CD8 /* ProcessingKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ProcessingKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E7212F431F34B5A600173CD8 /* ProcessingKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessingKit.h; sourceTree = ""; }; E7212F441F34B5A600173CD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E7212F491F34B5A600173CD8 /* ProcessingKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProcessingKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E7212F4E1F34B5A600173CD8 /* ProcessingViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessingViewTests.swift; sourceTree = ""; }; E7212F501F34B5A600173CD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E7387A481F44828F00C3B35C /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; E747DDA81F44656E006BAC6A /* Image.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Image.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E76046B71F4088FB00921B1A /* Loop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Loop.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E76046C01F408B2E00921B1A /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; E76820181F7B32B8009E8FD2 /* Date.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Date.swift; sourceTree = ""; }; E768201B1F7B38BC009E8FD2 /* DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = ""; }; E76820201F7B6446009E8FD2 /* Vertex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Vertex.swift; sourceTree = ""; }; E76820231F7B647A009E8FD2 /* Transform.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Transform.swift; sourceTree = ""; }; E76820351F7E49B1009E8FD2 /* Demo.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = Demo.playground; path = ProcessingKit/Demo.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; E777BB8D220312DC0086AC53 /* CGPath+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPath+Extension.swift"; sourceTree = ""; }; E7B2F67A21454010003B642A /* ProcessingKitCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ProcessingKitCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E7B2F6842145447B003B642A /* ProcessingView+Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Color.swift"; sourceTree = ""; }; E7B2F686214544A8003B642A /* ProcessingView+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Constants.swift"; sourceTree = ""; }; E7B2F688214544C6003B642A /* ProcessingView+Frame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Frame.swift"; sourceTree = ""; }; E7B2F68A214544EB003B642A /* ProcessingView+Image.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Image.swift"; sourceTree = ""; }; E7B2F68C2145450A003B642A /* ProcessingView+Date.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Date.swift"; sourceTree = ""; }; E7B2F6902145453B003B642A /* ProcessingView+Shape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Shape.swift"; sourceTree = ""; }; E7B2F69221454547003B642A /* ProcessingView+Vertex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Vertex.swift"; sourceTree = ""; }; E7B2F69421454577003B642A /* ProcessingView+Loop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Loop.swift"; sourceTree = ""; }; E7B2F69621454591003B642A /* ProcessingView+Transform.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Transform.swift"; sourceTree = ""; }; E7B2F698214545B4003B642A /* ProcessingView+Text.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Text.swift"; sourceTree = ""; }; E7B2F70F214553BF003B642A /* ProcessingKitCoreOSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ProcessingKitCoreOSX.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E7B77DCC1FF7D30500CE691A /* CGPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGPoint.swift; sourceTree = ""; }; E7B77DD31FF7E02900CE691A /* ProcessingKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ProcessingKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E7B77E231FF7E30C00CE691A /* Context.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Context.swift; sourceTree = ""; }; E7B77E291FF7EBFF00CE691A /* NSImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = ""; }; E7B77E2C1FF7F19700CE691A /* NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSView.swift; sourceTree = ""; }; E7D14AFA20ED138400906F04 /* GestureTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GestureTests.swift; sourceTree = ""; }; E7D14B4B2169F35A001E152C /* ProcessingView+Gesture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProcessingView+Gesture.swift"; sourceTree = ""; }; E7D14B4F216A0AEC001E152C /* Gesture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gesture.swift; sourceTree = ""; }; E7E1830C200A7D0D009C32ED /* TransformTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransformTests.swift; sourceTree = ""; }; E7F57865201E26ED0042C30F /* ShapeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShapeTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ E7212F3C1F34B5A600173CD8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7212F461F34B5A600173CD8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E7212F4A1F34B5A600173CD8 /* ProcessingKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F67221454010003B642A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F708214553BF003B642A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B77DCF1FF7E02900CE691A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ E70BB6871F408F9900E0372D /* Typography */ = { isa = PBXGroup; children = ( E70BB6881F408FAB00E0372D /* Text.swift */, ); path = Typography; sourceTree = ""; }; E7212F361F34B5A600173CD8 = { isa = PBXGroup; children = ( E76820351F7E49B1009E8FD2 /* Demo.playground */, E7212F421F34B5A600173CD8 /* ProcessingKit */, E7212F4D1F34B5A600173CD8 /* ProcessingKitTests */, E7212F411F34B5A600173CD8 /* Products */, E7B2F680214543FB003B642A /* Frameworks */, ); sourceTree = ""; }; E7212F411F34B5A600173CD8 /* Products */ = { isa = PBXGroup; children = ( E7212F401F34B5A600173CD8 /* ProcessingKit.framework */, E7212F491F34B5A600173CD8 /* ProcessingKitTests.xctest */, E7B77DD31FF7E02900CE691A /* ProcessingKit.framework */, E7B2F67A21454010003B642A /* ProcessingKitCore.framework */, E7B2F70F214553BF003B642A /* ProcessingKitCoreOSX.framework */, ); name = Products; sourceTree = ""; }; E7212F421F34B5A600173CD8 /* ProcessingKit */ = { isa = PBXGroup; children = ( E7B2F68221454437003B642A /* Core */, E7212F441F34B5A600173CD8 /* Info.plist */, E7212F431F34B5A600173CD8 /* ProcessingKit.h */, E7054AD31F34CCB200EA0C0F /* ProcessingView.swift */, E7B2F68321454450003B642A /* ProcessingView+Core */, ); path = ProcessingKit; sourceTree = ""; }; E7212F4D1F34B5A600173CD8 /* ProcessingKitTests */ = { isa = PBXGroup; children = ( E777BB8C220312BB0086AC53 /* CGPath+Extension */, E768201A1F7B38A3009E8FD2 /* Input */, E7212F501F34B5A600173CD8 /* Info.plist */, E71388DC1F7A1F5500A45FA6 /* ProcessingViewDelegateSpy.swift */, E7212F4E1F34B5A600173CD8 /* ProcessingViewTests.swift */, E7F57865201E26ED0042C30F /* ShapeTests.swift */, E7E1830C200A7D0D009C32ED /* TransformTests.swift */, E7D14AFA20ED138400906F04 /* GestureTests.swift */, ); path = ProcessingKitTests; sourceTree = ""; }; E7387A4A1F44829C00C3B35C /* Extensions */ = { isa = PBXGroup; children = ( E7387A481F44828F00C3B35C /* String.swift */, E713695F1F44945900267715 /* UIColor.swift */, E7B77DCC1FF7D30500CE691A /* CGPoint.swift */, E7B77E291FF7EBFF00CE691A /* NSImage.swift */, E7B77E2C1FF7F19700CE691A /* NSView.swift */, ); path = Extensions; sourceTree = ""; }; E76046B91F40894700921B1A /* Structure */ = { isa = PBXGroup; children = ( E76046B71F4088FB00921B1A /* Loop.swift */, ); path = Structure; sourceTree = ""; }; E76046BA1F40895100921B1A /* Environment */ = { isa = PBXGroup; children = ( E70BB68F1F40937100E0372D /* Frame.swift */, ); path = Environment; sourceTree = ""; }; E76046BB1F4089AF00921B1A /* Shape */ = { isa = PBXGroup; children = ( E7054ADF1F3A0A7E00EA0C0F /* Shape.swift */, E76820201F7B6446009E8FD2 /* Vertex.swift */, ); path = Shape; sourceTree = ""; }; E76046BC1F4089CF00921B1A /* Input */ = { isa = PBXGroup; children = ( E76820181F7B32B8009E8FD2 /* Date.swift */, E7D14B4F216A0AEC001E152C /* Gesture.swift */, ); path = Input; sourceTree = ""; }; E76046BD1F408A0E00921B1A /* Color */ = { isa = PBXGroup; children = ( E70BB68B1F40902A00E0372D /* Color.swift */, ); path = Color; sourceTree = ""; }; E76046BE1F408A1200921B1A /* Image */ = { isa = PBXGroup; children = ( E747DDA81F44656E006BAC6A /* Image.swift */, ); path = Image; sourceTree = ""; }; E76046BF1F408A3E00921B1A /* Constants */ = { isa = PBXGroup; children = ( E76046C01F408B2E00921B1A /* Constants.swift */, ); path = Constants; sourceTree = ""; }; E768201A1F7B38A3009E8FD2 /* Input */ = { isa = PBXGroup; children = ( E768201B1F7B38BC009E8FD2 /* DateTests.swift */, ); path = Input; sourceTree = ""; }; E76820221F7B6465009E8FD2 /* Transform */ = { isa = PBXGroup; children = ( E76820231F7B647A009E8FD2 /* Transform.swift */, ); path = Transform; sourceTree = ""; }; E777BB8C220312BB0086AC53 /* CGPath+Extension */ = { isa = PBXGroup; children = ( E777BB8D220312DC0086AC53 /* CGPath+Extension.swift */, ); path = "CGPath+Extension"; sourceTree = ""; }; E7B2F65E21453F65003B642A /* Context */ = { isa = PBXGroup; children = ( E7B77E231FF7E30C00CE691A /* Context.swift */, ); path = Context; sourceTree = ""; }; E7B2F680214543FB003B642A /* Frameworks */ = { isa = PBXGroup; children = ( ); name = Frameworks; sourceTree = ""; }; E7B2F68221454437003B642A /* Core */ = { isa = PBXGroup; children = ( E7B2F65E21453F65003B642A /* Context */, E76046BD1F408A0E00921B1A /* Color */, E76046BF1F408A3E00921B1A /* Constants */, E76046BA1F40895100921B1A /* Environment */, E7387A4A1F44829C00C3B35C /* Extensions */, E76046BE1F408A1200921B1A /* Image */, E76046BC1F4089CF00921B1A /* Input */, E76046BB1F4089AF00921B1A /* Shape */, E76046B91F40894700921B1A /* Structure */, E76820221F7B6465009E8FD2 /* Transform */, E70BB6871F408F9900E0372D /* Typography */, ); path = Core; sourceTree = ""; }; E7B2F68321454450003B642A /* ProcessingView+Core */ = { isa = PBXGroup; children = ( E7B2F6842145447B003B642A /* ProcessingView+Color.swift */, E7B2F686214544A8003B642A /* ProcessingView+Constants.swift */, E7B2F688214544C6003B642A /* ProcessingView+Frame.swift */, E7B2F68A214544EB003B642A /* ProcessingView+Image.swift */, E7B2F68C2145450A003B642A /* ProcessingView+Date.swift */, E7D14B4B2169F35A001E152C /* ProcessingView+Gesture.swift */, E7B2F6902145453B003B642A /* ProcessingView+Shape.swift */, E7B2F69221454547003B642A /* ProcessingView+Vertex.swift */, E7B2F69421454577003B642A /* ProcessingView+Loop.swift */, E7B2F69621454591003B642A /* ProcessingView+Transform.swift */, E7B2F698214545B4003B642A /* ProcessingView+Text.swift */, ); path = "ProcessingView+Core"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ E7212F3D1F34B5A600173CD8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E7212F511F34B5A600173CD8 /* ProcessingKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F67321454010003B642A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F70A214553BF003B642A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B77DD01FF7E02900CE691A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ E7212F3F1F34B5A600173CD8 /* ProcessingKit */ = { isa = PBXNativeTarget; buildConfigurationList = E7212F541F34B5A600173CD8 /* Build configuration list for PBXNativeTarget "ProcessingKit" */; buildPhases = ( E7212F3B1F34B5A600173CD8 /* Sources */, E7212F3C1F34B5A600173CD8 /* Frameworks */, E7212F3D1F34B5A600173CD8 /* Headers */, E7212F3E1F34B5A600173CD8 /* Resources */, E708FB7E1F64403500692D98 /* Swiftlint */, ); buildRules = ( ); dependencies = ( ); name = ProcessingKit; productName = ProcessingKit; productReference = E7212F401F34B5A600173CD8 /* ProcessingKit.framework */; productType = "com.apple.product-type.framework"; }; E7212F481F34B5A600173CD8 /* ProcessingKitTests */ = { isa = PBXNativeTarget; buildConfigurationList = E7212F571F34B5A600173CD8 /* Build configuration list for PBXNativeTarget "ProcessingKitTests" */; buildPhases = ( E7212F451F34B5A600173CD8 /* Sources */, E7212F461F34B5A600173CD8 /* Frameworks */, E7212F471F34B5A600173CD8 /* Resources */, ); buildRules = ( ); dependencies = ( E7212F4C1F34B5A600173CD8 /* PBXTargetDependency */, ); name = ProcessingKitTests; productName = ProcessingKitTests; productReference = E7212F491F34B5A600173CD8 /* ProcessingKitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; E7B2F66021454010003B642A /* ProcessingKitCore */ = { isa = PBXNativeTarget; buildConfigurationList = E7B2F67721454010003B642A /* Build configuration list for PBXNativeTarget "ProcessingKitCore" */; buildPhases = ( E7B2F66121454010003B642A /* Sources */, E7B2F67221454010003B642A /* Frameworks */, E7B2F67321454010003B642A /* Headers */, E7B2F67521454010003B642A /* Resources */, ); buildRules = ( ); dependencies = ( ); name = ProcessingKitCore; productName = ProcessingKit; productReference = E7B2F67A21454010003B642A /* ProcessingKitCore.framework */; productType = "com.apple.product-type.framework"; }; E7B2F6E9214553BF003B642A /* ProcessingKitCoreOSX */ = { isa = PBXNativeTarget; buildConfigurationList = E7B2F70C214553BF003B642A /* Build configuration list for PBXNativeTarget "ProcessingKitCoreOSX" */; buildPhases = ( E7B2F6EA214553BF003B642A /* Sources */, E7B2F708214553BF003B642A /* Frameworks */, E7B2F70A214553BF003B642A /* Headers */, E7B2F70B214553BF003B642A /* Resources */, ); buildRules = ( ); dependencies = ( ); name = ProcessingKitCoreOSX; productName = "ProcessingKit OSX"; productReference = E7B2F70F214553BF003B642A /* ProcessingKitCoreOSX.framework */; productType = "com.apple.product-type.framework"; }; E7B77DD21FF7E02900CE691A /* ProcessingKit OSX */ = { isa = PBXNativeTarget; buildConfigurationList = E7B77DE81FF7E02A00CE691A /* Build configuration list for PBXNativeTarget "ProcessingKit OSX" */; buildPhases = ( E7B77DCE1FF7E02900CE691A /* Sources */, E7B77DCF1FF7E02900CE691A /* Frameworks */, E7B77DD01FF7E02900CE691A /* Headers */, E7B77DD11FF7E02900CE691A /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "ProcessingKit OSX"; productName = "ProcessingKit OSX"; productReference = E7B77DD31FF7E02900CE691A /* ProcessingKit.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ E7212F371F34B5A600173CD8 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Atsuya Sato"; TargetAttributes = { E7212F3F1F34B5A600173CD8 = { CreatedOnToolsVersion = 8.3.3; LastSwiftMigration = 0910; ProvisioningStyle = Automatic; }; E7212F481F34B5A600173CD8 = { CreatedOnToolsVersion = 8.3.3; LastSwiftMigration = 0910; ProvisioningStyle = Automatic; }; E7B2F66021454010003B642A = { ProvisioningStyle = Automatic; }; E7B2F6E9214553BF003B642A = { ProvisioningStyle = Automatic; }; E7B77DD21FF7E02900CE691A = { CreatedOnToolsVersion = 9.1; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = E7212F3A1F34B5A600173CD8 /* Build configuration list for PBXProject "ProcessingKit" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = E7212F361F34B5A600173CD8; productRefGroup = E7212F411F34B5A600173CD8 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( E7212F3F1F34B5A600173CD8 /* ProcessingKit */, E7212F481F34B5A600173CD8 /* ProcessingKitTests */, E7B77DD21FF7E02900CE691A /* ProcessingKit OSX */, E7B2F66021454010003B642A /* ProcessingKitCore */, E7B2F6E9214553BF003B642A /* ProcessingKitCoreOSX */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ E7212F3E1F34B5A600173CD8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7212F471F34B5A600173CD8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F67521454010003B642A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F70B214553BF003B642A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E7B77DD11FF7E02900CE691A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ E708FB7E1F64403500692D98 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = Swiftlint; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"SwiftLint does not exist, download from https://github.com/realm/SwiftLint\"\nfi"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ E7212F3B1F34B5A600173CD8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7B2F68B214544EB003B642A /* ProcessingView+Image.swift in Sources */, E7B2F6A221454F8B003B642A /* Frame.swift in Sources */, E7B2F6912145453B003B642A /* ProcessingView+Shape.swift in Sources */, E7D14B4C2169F35A001E152C /* ProcessingView+Gesture.swift in Sources */, E7B2F6AC21454FA8003B642A /* Transform.swift in Sources */, E7B2F6A921454FA1003B642A /* Shape.swift in Sources */, E7B2F6AA21454FA3003B642A /* Vertex.swift in Sources */, E7B2F69F21454F80003B642A /* Context.swift in Sources */, E7B2F687214544A8003B642A /* ProcessingView+Constants.swift in Sources */, E7B2F6A121454F86003B642A /* Constants.swift in Sources */, E7B2F6A521454F95003B642A /* CGPoint.swift in Sources */, E7D14B50216A0AEC001E152C /* Gesture.swift in Sources */, E7B2F699214545B4003B642A /* ProcessingView+Text.swift in Sources */, E7B2F6A621454F99003B642A /* Image.swift in Sources */, E7054AD41F34CCB200EA0C0F /* ProcessingView.swift in Sources */, E7B2F68D2145450A003B642A /* ProcessingView+Date.swift in Sources */, E7B2F6852145447B003B642A /* ProcessingView+Color.swift in Sources */, E7B2F6A021454F83003B642A /* Color.swift in Sources */, E7B2F69521454577003B642A /* ProcessingView+Loop.swift in Sources */, E7B2F6A421454F93003B642A /* UIColor.swift in Sources */, E7B2F6A721454F9C003B642A /* Date.swift in Sources */, E7B2F6AB21454FA6003B642A /* Loop.swift in Sources */, E7B2F6AD21454FAB003B642A /* Text.swift in Sources */, E7B2F69321454547003B642A /* ProcessingView+Vertex.swift in Sources */, E7B2F6A321454F8E003B642A /* String.swift in Sources */, E7B2F689214544C7003B642A /* ProcessingView+Frame.swift in Sources */, E7B2F69721454591003B642A /* ProcessingView+Transform.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E7212F451F34B5A600173CD8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7212F4F1F34B5A600173CD8 /* ProcessingViewTests.swift in Sources */, E768201C1F7B38BC009E8FD2 /* DateTests.swift in Sources */, E71388DD1F7A1F5500A45FA6 /* ProcessingViewDelegateSpy.swift in Sources */, E7F57866201E26ED0042C30F /* ShapeTests.swift in Sources */, E7D14AFB20ED138400906F04 /* GestureTests.swift in Sources */, E777BB8E220312DC0086AC53 /* CGPath+Extension.swift in Sources */, E7E1830D200A7D0D009C32ED /* TransformTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F66121454010003B642A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7B2F66221454010003B642A /* Shape.swift in Sources */, E7B2F66321454010003B642A /* Image.swift in Sources */, E7B2F66421454010003B642A /* Frame.swift in Sources */, E7B2F66521454010003B642A /* Context.swift in Sources */, E7B2F66721454010003B642A /* String.swift in Sources */, E7B2F66821454010003B642A /* Color.swift in Sources */, E7D14B5F216A5A88001E152C /* Gesture.swift in Sources */, E7B2F66921454010003B642A /* Loop.swift in Sources */, E7B2F66A21454010003B642A /* Vertex.swift in Sources */, E7B2F66B21454010003B642A /* UIColor.swift in Sources */, E7B2F66D21454010003B642A /* Transform.swift in Sources */, E7B2F66E21454010003B642A /* Text.swift in Sources */, E7B2F66F21454010003B642A /* Date.swift in Sources */, E7B2F67021454010003B642A /* CGPoint.swift in Sources */, E7B2F67121454010003B642A /* Constants.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E7B2F6EA214553BF003B642A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7B2F71A21455442003B642A /* NSView.swift in Sources */, E7B2F71921455442003B642A /* NSImage.swift in Sources */, E7B2F72021455448003B642A /* Loop.swift in Sources */, E7D14B60216A5A89001E152C /* Gesture.swift in Sources */, E7B2F7122145542F003B642A /* Context.swift in Sources */, E7B2F71721455437003B642A /* UIColor.swift in Sources */, E7B2F71521455437003B642A /* Frame.swift in Sources */, E7B2F71821455437003B642A /* CGPoint.swift in Sources */, E7B2F72121455448003B642A /* Transform.swift in Sources */, E7B2F71F21455448003B642A /* Vertex.swift in Sources */, E7B2F71E21455448003B642A /* Shape.swift in Sources */, E7B2F71621455437003B642A /* String.swift in Sources */, E7B2F72221455448003B642A /* Text.swift in Sources */, E7B2F71321455437003B642A /* Color.swift in Sources */, E7B2F71C21455448003B642A /* Date.swift in Sources */, E7B2F71421455437003B642A /* Constants.swift in Sources */, E7B2F71B21455448003B642A /* Image.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E7B77DCE1FF7E02900CE691A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7B2F6CC21455079003B642A /* ProcessingView+Transform.swift in Sources */, E7B2F6C321455079003B642A /* ProcessingView+Color.swift in Sources */, E7B2F6C421455079003B642A /* ProcessingView+Constants.swift in Sources */, E7D14B61216A5BD6001E152C /* ProcessingView+Gesture.swift in Sources */, E7B2F6B221454FC9003B642A /* NSImage.swift in Sources */, E7B2F6B421454FDE003B642A /* Context.swift in Sources */, E7B2F6CB21455079003B642A /* ProcessingView+Loop.swift in Sources */, E7B2F6B321454FC9003B642A /* NSView.swift in Sources */, E7B2F6C721455079003B642A /* ProcessingView+Date.swift in Sources */, E7B2F6BE21454FF9003B642A /* Shape.swift in Sources */, E7B2F6C221454FF9003B642A /* Text.swift in Sources */, E7B2F6B521454FE0003B642A /* Color.swift in Sources */, E7B2F6B921454FE9003B642A /* UIColor.swift in Sources */, E7B2F6CD21455079003B642A /* ProcessingView+Text.swift in Sources */, E7B2F6CA21455079003B642A /* ProcessingView+Vertex.swift in Sources */, E7B2F6C621455079003B642A /* ProcessingView+Image.swift in Sources */, E7B2F6C121454FF9003B642A /* Transform.swift in Sources */, E7B2F6B721454FE5003B642A /* Frame.swift in Sources */, E7B77E221FF7E1B300CE691A /* ProcessingView.swift in Sources */, E7B2F6BF21454FF9003B642A /* Vertex.swift in Sources */, E7B2F6BC21454FF9003B642A /* Date.swift in Sources */, E7B2F6B821454FE9003B642A /* String.swift in Sources */, E7B2F6C521455079003B642A /* ProcessingView+Frame.swift in Sources */, E7B2F6BA21454FE9003B642A /* CGPoint.swift in Sources */, E7B2F6BB21454FF9003B642A /* Image.swift in Sources */, E7B2F6B621454FE3003B642A /* Constants.swift in Sources */, E7D14B5E216A5A87001E152C /* Gesture.swift in Sources */, E7B2F6C921455079003B642A /* ProcessingView+Shape.swift in Sources */, E7B2F6C021454FF9003B642A /* Loop.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ E7212F4C1F34B5A600173CD8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E7212F3F1F34B5A600173CD8 /* ProcessingKit */; targetProxy = E7212F4B1F34B5A600173CD8 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ E7212F521F34B5A600173CD8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; E7212F531F34B5A600173CD8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; E7212F551F34B5A600173CD8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/ProcessingKit/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKit; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Debug; }; E7212F561F34B5A600173CD8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/ProcessingKit/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKit; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Release; }; E7212F581F34B5A600173CD8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ProcessingKitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Debug; }; E7212F591F34B5A600173CD8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ProcessingKitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Release; }; E7B2F67821454010003B642A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitCore; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Debug; }; E7B2F67921454010003B642A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitCore; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; }; name = Release; }; E7B2F70D214553BF003B642A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "io.github.natmark.ProcessingKitCore-OSX"; PRODUCT_MODULE_NAME = ProcessingKitCoreOSX; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 4.2; }; name = Debug; }; E7B2F70E214553BF003B642A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "io.github.natmark.ProcessingKitCore-OSX"; PRODUCT_MODULE_NAME = ProcessingKitCoreOSX; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 4.2; }; name = Release; }; E7B77DE41FF7E02A00CE691A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "io.github.natmark.ProcessingKit-OSX"; PRODUCT_NAME = ProcessingKit; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 4.2; }; name = Debug; }; E7B77DE51FF7E02A00CE691A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ProcessingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "io.github.natmark.ProcessingKit-OSX"; PRODUCT_NAME = ProcessingKit; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_VERSION = 4.2; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ E7212F3A1F34B5A600173CD8 /* Build configuration list for PBXProject "ProcessingKit" */ = { isa = XCConfigurationList; buildConfigurations = ( E7212F521F34B5A600173CD8 /* Debug */, E7212F531F34B5A600173CD8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E7212F541F34B5A600173CD8 /* Build configuration list for PBXNativeTarget "ProcessingKit" */ = { isa = XCConfigurationList; buildConfigurations = ( E7212F551F34B5A600173CD8 /* Debug */, E7212F561F34B5A600173CD8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E7212F571F34B5A600173CD8 /* Build configuration list for PBXNativeTarget "ProcessingKitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( E7212F581F34B5A600173CD8 /* Debug */, E7212F591F34B5A600173CD8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E7B2F67721454010003B642A /* Build configuration list for PBXNativeTarget "ProcessingKitCore" */ = { isa = XCConfigurationList; buildConfigurations = ( E7B2F67821454010003B642A /* Debug */, E7B2F67921454010003B642A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E7B2F70C214553BF003B642A /* Build configuration list for PBXNativeTarget "ProcessingKitCoreOSX" */ = { isa = XCConfigurationList; buildConfigurations = ( E7B2F70D214553BF003B642A /* Debug */, E7B2F70E214553BF003B642A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E7B77DE81FF7E02A00CE691A /* Build configuration list for PBXNativeTarget "ProcessingKit OSX" */ = { isa = XCConfigurationList; buildConfigurations = ( E7B77DE41FF7E02A00CE691A /* Debug */, E7B77DE51FF7E02A00CE691A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = E7212F371F34B5A600173CD8 /* Project object */; } ================================================ FILE: ProcessingKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: ProcessingKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: ProcessingKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ ================================================ FILE: ProcessingKit.xcodeproj/xcshareddata/xcschemes/ProcessingKit OSX.xcscheme ================================================ ================================================ FILE: ProcessingKit.xcodeproj/xcshareddata/xcschemes/ProcessingKit.xcscheme ================================================ ================================================ FILE: ProcessingKit.xcodeproj/xcshareddata/xcschemes/ProcessingKitTests.xcscheme ================================================ ================================================ FILE: ProcessingKit.xctemplate/TemplateInfo.plist ================================================ DefaultCompletionName SketchView Description A ProcessingKit sketch view class, with implementation and header files. Kind Xcode.IDEKit.TextSubstitutionFileTemplateKind MainTemplateFile ___FILEBASENAME___.swift Options Description The name of the class to create Identifier productName Default SketchView Name ProcessingKit sketch view class NotPersisted Required Type text Platforms com.apple.platform.iphoneos com.apple.platform.macosx Summary A ProcessingKit sketch view ================================================ FILE: ProcessingKit.xctemplate/___FILEBASENAME___.swift ================================================ // // ___FILENAME___ // ___PROJECTNAME___ // // Created by ___FULLUSERNAME___ on ___DATE___. //___COPYRIGHT___ // #if os(iOS) import UIKit #elseif os(OSX) import Cocoa #endif import ProcessingKit class ___FILEBASENAMEASIDENTIFIER___: ProcessingView { func setup() { } func draw() { } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/AppDelegate.swift ================================================ // // AppDelegate.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/05. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "size" : "20x20", "idiom" : "iphone", "filename" : "icon-20@2x.png", "scale" : "2x" }, { "size" : "20x20", "idiom" : "iphone", "filename" : "icon-20@3x.png", "scale" : "3x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-29@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-29@3x.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-40@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-40@3x.png", "scale" : "3x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-60@2x.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-60@3x.png", "scale" : "3x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "1x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "2x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "icon-29.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "icon-29@2x-1.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "icon-40.png", "scale" : "1x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "icon-40@2x-1.png", "scale" : "2x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "icon-76.png", "scale" : "1x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "icon-76@2x.png", "scale" : "2x" }, { "size" : "83.5x83.5", "idiom" : "ipad", "filename" : "icon-83.5@2x.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", "filename" : "icon.png", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Assets.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Assets.xcassets/ProcessingKit-Logo.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ProcessingKit-Header.png", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Base.lproj/Main.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ArcSampleView.swift ================================================ // // ArcSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/26. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class ArcSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.red) strokeWeight(5.0) stroke(UIColor.blue) arc(200, 200, 100, radians(0), radians(90.0)) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ArcSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ArcSampleViewController.swift ================================================ // // ArcSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/26. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class ArcSampleViewController: UIViewController { @IBOutlet weak var arcSampleView: ArcSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/CurveSampleView.swift ================================================ // // CurveSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/30. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class CurveSampleView : ProcessingView { func setup() { background(UIColor.white) stroke(UIColor.black) curve(40, 40, 80, 60, 100, 100, 60, 120) noStroke() fill(255, 0, 0) ellipse(40, 40, 3, 3) fill(0, 0, 255, 192) ellipse(100, 100, 3, 3) ellipse(80, 60, 3, 3) fill(255, 0, 0) ellipse(60, 120, 3, 3) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/CurveSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/CurveSampleViewController.swift ================================================ // // CurveSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/30. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class CurveSampleViewController: UIViewController { @IBOutlet weak var curveSampleView: CurveSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/EllipseSampleView.swift ================================================ // // EllipseSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class EllipseSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.red) ellipse(200, 100, 100, 100) fill(UIColor.blue) ellipse(250, 150, 100, 100) noFill() stroke(UIColor.black) ellipse(150, 200, 100, 100) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/EllipseSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/EllipseSampleViewController.swift ================================================ // // EllipseSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class EllipseSampleViewController: UIViewController { @IBOutlet weak var ellipseSampleView: EllipseSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ImageSampleView.swift ================================================ // // ImageSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class ImageSampleView : ProcessingView { func setup() { image(UIImage(named: "ProcessingKit-Logo")!, 0, 100, width, 100) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ImageSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/ImageSampleViewController.swift ================================================ // // ImageSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class ImageSampleViewController: UIViewController { @IBOutlet var imageSampleView: ImageSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/QuadSampleView.swift ================================================ // // QuadSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/29. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class QuadSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.red) strokeWeight(5.0) stroke(UIColor.blue) quad(30, 30, 20, 150, 200, 200, 400, 100) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/QuadSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/QuadSampleViewController.swift ================================================ // // QuadSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/29. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class QuadSampleViewController: UIViewController { @IBOutlet weak var quadSampleView: QuadSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/RectSampleView.swift ================================================ // // RectSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class RectSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.red) rect(200, 100, 100, 100) fill(UIColor.blue) rect(250, 150, 100, 100) noFill() stroke(UIColor.black) rect(150, 200, 100, 100) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/RectSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/RectSampleViewController.swift ================================================ // // RectSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class RectSampleViewController: UIViewController { @IBOutlet weak var rectSampleView: RectSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TextSampleView.swift ================================================ // // LineSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class TextSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.black) textSize(64.0) textAlign(.center) text("Hello World", self.frame.size.width / 2, self.frame.size.height / 2) textFont(UIFont(name: "AmericanTypewriter", size: 40.0)!) fill(UIColor(red: 4 / 255.0, green: 39 / 255.0, blue: 69 / 255.0, alpha: 255.0 / 255.0)) text("Processing Kit", self.frame.size.width / 2, self.frame.size.height / 2 + 50) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TextSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TextSampleViewController.swift ================================================ // // LineSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class TextSampleViewController: UIViewController { @IBOutlet weak var textSampleView: TextSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TriangleSampleView.swift ================================================ // // TriangleSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/29. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class TriangleSampleView : ProcessingView { func setup() { background(UIColor.white) fill(UIColor.red) strokeWeight(5.0) stroke(UIColor.blue) triangle(width/2, 100, 0, height/2, width, height/2) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TriangleSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/BasicFunctions/TriangleSampleViewController.swift ================================================ // // TriangleSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/12/29. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class TriangleSampleViewController: UIViewController { @IBOutlet weak var triangleSampleView: TriangleSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Extensions/ViewController.swift ================================================ // // ViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit public extension UIViewController { static func create() -> Self { let name: String = "\(type(of: self))".components(separatedBy: ".").first! return instantiate(storyboardName: name) } private static func instantiate(storyboardName: String) -> T { let storyboard: UIStoryboard = UIStoryboard(name: storyboardName, bundle: nil) let vc: UIViewController? = storyboard.instantiateInitialViewController() return vc as! T } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: ProcessingKitExample/ProcessingKitExample/MainTableViewController.swift ================================================ // // MainTableViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class MainTableViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) switch indexPath { case IndexPath(row: 0, section: 0): //Text transition(viewController: TextSampleViewController.create()) return case IndexPath(row: 1, section: 0): //Rect transition(viewController: RectSampleViewController.create()) return case IndexPath(row: 2, section: 0): //Ellipse transition(viewController: EllipseSampleViewController.create()) return case IndexPath(row: 3, section: 0): //Arc transition(viewController: ArcSampleViewController.create()) return case IndexPath(row: 4, section: 0): //Triangle transition(viewController: TriangleSampleViewController.create()) return case IndexPath(row: 5, section: 0): //Quad transition(viewController: QuadSampleViewController.create()) return case IndexPath(row: 6, section: 0): //Curve transition(viewController: CurveSampleViewController.create()) return case IndexPath(row: 7, section: 0): //Image transition(viewController: ImageSampleViewController.create()) return case IndexPath(row: 0, section: 1): //Simple Tap transition(viewController: TouchSampleViewController.create()) case IndexPath(row: 0, section: 2): //Particles transition(viewController: ParticlesSampleViewController.create()) case IndexPath(row: 1, section: 2): //Clock Sample transition(viewController: ClockSampleViewController.create()) return default: return } } func transition(viewController: UIViewController){ self.navigationController?.pushViewController(viewController, animated: true) } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ClockSampleView.swift ================================================ // // ClockSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/30. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class ClockSampleView : ProcessingView { func setup() { stroke(UIColor.black) } func draw() { background(UIColor.white) let s = second() let m = minute() let h = hour() % 12 translate(width/2, width/2) noFill() stroke(UIColor.black) // 秒針 pushMatrix() rotate(radians(CGFloat(s)*(360/60))) strokeWeight(1) line(0, 0, 0, -width/2) popMatrix() // 分針 pushMatrix() rotate(radians(CGFloat(m)*(360/60))) strokeWeight(2) line(0, 0, 0, -width/2) popMatrix() // 時針 pushMatrix() rotate(radians(CGFloat(h)*(360/12))) strokeWeight(4) line(0, 0, 0, -width/3) popMatrix() strokeWeight(2); beginShape(.points); stride(from: 0, to: 360, by: 6).forEach { let angle = radians(CGFloat($0)) let x = cos(angle) * width / 2 let y = sin(angle) * width / 2 vertex(x, y) } endShape() } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ClockSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ClockSampleViewController.swift ================================================ // // ClockSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/09/30. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class ClockSampleViewController: UIViewController { @IBOutlet weak var clockSampleView: ClockSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ParticlesSampleView.swift ================================================ // // ParticlesSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/17. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class ParticlesSampleView : ProcessingView { let totalDots = 50 var dots: [Dot] = [] let diameter: CGFloat = 12.0 func setup() { // initial fill colour fill(UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)) noStroke(); // array of dots for _ in 0..Float { return ( Float(arc4random_uniform(UINT32_MAX)) / Float(UINT32_MAX) ) * (_Max - _Min) + _Min } } class Dot { var x: CGFloat = 0.0 var y: CGFloat = 0.0 var vx: CGFloat = 0.0 var vy: CGFloat = 0.0 var width: CGFloat = 0.0 var height: CGFloat = 0.0 init(width: CGFloat, height: CGFloat){ self.width = width self.height = height } func update(){ // update the velocity self.vx = self.vx + CGFloat(getRandomNumber(Min: 0.0, Max: 2.0) - 1.0) self.vx = self.vx * 0.96 self.vy = self.vy + CGFloat(getRandomNumber(Min: 0.0, Max: 2.0) - 1.0) self.vy = self.vy * 0.96 // update the position self.x = self.x + self.vx self.y = self.y + self.vy // handle boundary collision if (self.x > self.width) { self.x = self.width; self.vx = self.vx * -1.0 } if (self.x < 0) { self.x = 0; self.vx = self.vx * -1.0 } if (self.y > self.height) { self.y = self.height; self.vy = self.vy * -1.0 } if (self.y < 0) { self.y = 0; self.vy = self.vy * -1.0 } } private func getRandomNumber(Min _Min : Float, Max _Max : Float)->Float { return ( Float(arc4random_uniform(UINT32_MAX)) / Float(UINT32_MAX) ) * (_Max - _Min) + _Min } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ParticlesSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/OthersSample/ParticlesSampleViewController.swift ================================================ // // ParticlesSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/17. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class ParticlesSampleViewController: UIViewController { @IBOutlet weak var particlesSampleView: ParticlesSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/TouchSample/TouchSampleView.swift ================================================ // // TouchSampleView.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/05. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit import ProcessingKit class TouchSampleView : ProcessingView { func setup() { background(UIColor.white) textAlign(.center) textSize(20.0) stroke(UIColor.black) fill(UIColor.black) text("Touch me!", self.frame.size.width / 2, self.frame.size.height / 2) noStroke() fill(UIColor.red) } func draw() { if fingerPressed { ellipse(touchX, touchY, 30, 30) } } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample/TouchSample/TouchSampleViewController.storyboard ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample/TouchSample/TouchSampleViewController.swift ================================================ // // TouchSampleViewController.swift // ProcessingKitExample // // Created by AtsuyaSato on 2017/08/16. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import UIKit class TouchSampleViewController: UIViewController { @IBOutlet weak var touchSampleView: TouchSampleView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } ================================================ FILE: ProcessingKitExample/ProcessingKitExample.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ E7054AD71F34D36200EA0C0F /* TouchSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7054AD61F34D36200EA0C0F /* TouchSampleView.swift */; }; E70595211F44899E005C8856 /* EllipseSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70595201F44899E005C8856 /* EllipseSampleView.swift */; }; E70595231F4489AA005C8856 /* TextSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70595221F4489AA005C8856 /* TextSampleView.swift */; }; E70595251F4489B8005C8856 /* RectSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E70595241F4489B8005C8856 /* RectSampleView.swift */; }; E71388D61F79568F00A45FA6 /* ArcSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E71388D51F79568F00A45FA6 /* ArcSampleViewController.swift */; }; E71388D91F79569900A45FA6 /* ArcSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71388D81F79569900A45FA6 /* ArcSampleViewController.storyboard */; }; E71388DB1F7956B700A45FA6 /* ArcSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E71388DA1F7956B700A45FA6 /* ArcSampleView.swift */; }; E71779F81F4C60A2004243F2 /* ParticlesSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71779F71F4C60A2004243F2 /* ParticlesSampleViewController.storyboard */; }; E71779FB1F4C6169004243F2 /* RectSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71779FA1F4C6169004243F2 /* RectSampleViewController.storyboard */; }; E71779FD1F4C617E004243F2 /* TextSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71779FC1F4C617E004243F2 /* TextSampleViewController.storyboard */; }; E71779FF1F4C6195004243F2 /* EllipseSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71779FE1F4C6195004243F2 /* EllipseSampleViewController.storyboard */; }; E72A2AB21F7F95F50044F879 /* ClockSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E72A2AB11F7F95F50044F879 /* ClockSampleViewController.storyboard */; }; E72A2AB51F7F96020044F879 /* ClockSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72A2AB41F7F96020044F879 /* ClockSampleView.swift */; }; E72A2AB71F7F961A0044F879 /* ClockSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72A2AB61F7F961A0044F879 /* ClockSampleViewController.swift */; }; E743310B1F34C6AB00D20482 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E743310A1F34C6AB00D20482 /* AppDelegate.swift */; }; E74331101F34C6AB00D20482 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E743310E1F34C6AB00D20482 /* Main.storyboard */; }; E74331121F34C6AB00D20482 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E74331111F34C6AB00D20482 /* Assets.xcassets */; }; E74331151F34C6AB00D20482 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E74331131F34C6AB00D20482 /* LaunchScreen.storyboard */; }; E747DD961F432F14006BAC6A /* ProcessingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E747DD8E1F432E9C006BAC6A /* ProcessingKit.framework */; }; E747DD971F432F14006BAC6A /* ProcessingKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E747DD8E1F432E9C006BAC6A /* ProcessingKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E747DDB21F446A81006BAC6A /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDB11F446A81006BAC6A /* MainTableViewController.swift */; }; E747DDB51F447322006BAC6A /* TouchSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E747DDB41F447322006BAC6A /* TouchSampleViewController.storyboard */; }; E747DDB71F447335006BAC6A /* TouchSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDB61F447335006BAC6A /* TouchSampleViewController.swift */; }; E747DDB91F4473E8006BAC6A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E747DDB81F4473E8006BAC6A /* ViewController.swift */; }; E76820071F7AAEB4009E8FD2 /* ImageSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820061F7AAEB4009E8FD2 /* ImageSampleView.swift */; }; E76820091F7AAEE1009E8FD2 /* ImageSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76820081F7AAEE1009E8FD2 /* ImageSampleViewController.swift */; }; E768200B1F7AAF87009E8FD2 /* ImageSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E768200A1F7AAF0D009E8FD2 /* ImageSampleViewController.storyboard */; }; E77AEFDE1FF684C600B97406 /* TriangleSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E77AEFDD1FF684C600B97406 /* TriangleSampleViewController.storyboard */; }; E77AEFE11FF684E900B97406 /* TriangleSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77AEFE01FF684E900B97406 /* TriangleSampleViewController.swift */; }; E77AEFE31FF684F600B97406 /* TriangleSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77AEFE21FF684F600B97406 /* TriangleSampleView.swift */; }; E77AEFE91FF68ACB00B97406 /* QuadSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77AEFE81FF68ACB00B97406 /* QuadSampleViewController.swift */; }; E77AEFEE1FF68AF300B97406 /* QuadSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E77AEFED1FF68AF300B97406 /* QuadSampleViewController.storyboard */; }; E77AEFF01FF68B0200B97406 /* QuadSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77AEFEF1FF68B0200B97406 /* QuadSampleView.swift */; }; E7B77DC51FF7B74100CE691A /* CurveSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DC41FF7B74100CE691A /* CurveSampleViewController.swift */; }; E7B77DC81FF7B75500CE691A /* CurveSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B77DC71FF7B75500CE691A /* CurveSampleView.swift */; }; E7B77DCA1FF7B76300CE691A /* CurveSampleViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E7B77DC91FF7B76300CE691A /* CurveSampleViewController.storyboard */; }; E7D399121F44A4D1006AF039 /* ParticlesSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D399111F44A4D1006AF039 /* ParticlesSampleView.swift */; }; E7D399141F44A505006AF039 /* ParticlesSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D399131F44A505006AF039 /* ParticlesSampleViewController.swift */; }; E7F3BA7D1F44880200EFB169 /* TextSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7F3BA7C1F44880200EFB169 /* TextSampleViewController.swift */; }; E7F3BA7F1F44880F00EFB169 /* RectSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7F3BA7E1F44880F00EFB169 /* RectSampleViewController.swift */; }; E7F3BA811F44881A00EFB169 /* EllipseSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7F3BA801F44881A00EFB169 /* EllipseSampleViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ E747DD8D1F432E9C006BAC6A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7212F401F34B5A600173CD8; remoteInfo = ProcessingKit; }; E747DD8F1F432E9C006BAC6A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7212F491F34B5A600173CD8; remoteInfo = ProcessingKitTests; }; E747DD981F432F14006BAC6A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 1; remoteGlobalIDString = E7212F3F1F34B5A600173CD8; remoteInfo = ProcessingKit; }; E7B2F728214555F2003B642A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B2F67A21454010003B642A; remoteInfo = ProcessingKitCore; }; E7B2F72A214555F2003B642A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B2F70F214553BF003B642A; remoteInfo = ProcessingKitCoreOSX; }; E7E79BD92008674B003CDAC5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B77DD31FF7E02900CE691A; remoteInfo = "ProcessingKit OSX"; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ E747DD9A1F432F14006BAC6A /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( E747DD971F432F14006BAC6A /* ProcessingKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ E7054ACF1F34CA9D00EA0C0F /* SpriteKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SpriteKit.framework; path = System/Library/Frameworks/SpriteKit.framework; sourceTree = SDKROOT; }; E7054AD61F34D36200EA0C0F /* TouchSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchSampleView.swift; sourceTree = ""; }; E70595201F44899E005C8856 /* EllipseSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EllipseSampleView.swift; sourceTree = ""; }; E70595221F4489AA005C8856 /* TextSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextSampleView.swift; sourceTree = ""; }; E70595241F4489B8005C8856 /* RectSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RectSampleView.swift; sourceTree = ""; }; E71388D51F79568F00A45FA6 /* ArcSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArcSampleViewController.swift; sourceTree = ""; }; E71388D81F79569900A45FA6 /* ArcSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ArcSampleViewController.storyboard; sourceTree = ""; }; E71388DA1F7956B700A45FA6 /* ArcSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArcSampleView.swift; sourceTree = ""; }; E71779F71F4C60A2004243F2 /* ParticlesSampleViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ParticlesSampleViewController.storyboard; sourceTree = ""; }; E71779FA1F4C6169004243F2 /* RectSampleViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = RectSampleViewController.storyboard; sourceTree = ""; }; E71779FC1F4C617E004243F2 /* TextSampleViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = TextSampleViewController.storyboard; sourceTree = ""; }; E71779FE1F4C6195004243F2 /* EllipseSampleViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = EllipseSampleViewController.storyboard; sourceTree = ""; }; E72A2AB11F7F95F50044F879 /* ClockSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ClockSampleViewController.storyboard; sourceTree = ""; }; E72A2AB41F7F96020044F879 /* ClockSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClockSampleView.swift; sourceTree = ""; }; E72A2AB61F7F961A0044F879 /* ClockSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClockSampleViewController.swift; sourceTree = ""; }; E74331071F34C6AB00D20482 /* ProcessingKitExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProcessingKitExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; E743310A1F34C6AB00D20482 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E743310F1F34C6AB00D20482 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; E74331111F34C6AB00D20482 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E74331141F34C6AB00D20482 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; E74331161F34C6AB00D20482 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ProcessingKit.xcodeproj; path = ../ProcessingKit.xcodeproj; sourceTree = ""; }; E747DDB11F446A81006BAC6A /* MainTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTableViewController.swift; sourceTree = ""; }; E747DDB41F447322006BAC6A /* TouchSampleViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = TouchSampleViewController.storyboard; sourceTree = ""; }; E747DDB61F447335006BAC6A /* TouchSampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TouchSampleViewController.swift; sourceTree = ""; }; E747DDB81F4473E8006BAC6A /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; E76820061F7AAEB4009E8FD2 /* ImageSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSampleView.swift; sourceTree = ""; }; E76820081F7AAEE1009E8FD2 /* ImageSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSampleViewController.swift; sourceTree = ""; }; E768200A1F7AAF0D009E8FD2 /* ImageSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ImageSampleViewController.storyboard; sourceTree = ""; }; E77AEFDD1FF684C600B97406 /* TriangleSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TriangleSampleViewController.storyboard; sourceTree = ""; }; E77AEFE01FF684E900B97406 /* TriangleSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TriangleSampleViewController.swift; sourceTree = ""; }; E77AEFE21FF684F600B97406 /* TriangleSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TriangleSampleView.swift; sourceTree = ""; }; E77AEFE81FF68ACB00B97406 /* QuadSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuadSampleViewController.swift; sourceTree = ""; }; E77AEFED1FF68AF300B97406 /* QuadSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = QuadSampleViewController.storyboard; sourceTree = ""; }; E77AEFEF1FF68B0200B97406 /* QuadSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuadSampleView.swift; sourceTree = ""; }; E7B77DC41FF7B74100CE691A /* CurveSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurveSampleViewController.swift; sourceTree = ""; }; E7B77DC71FF7B75500CE691A /* CurveSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurveSampleView.swift; sourceTree = ""; }; E7B77DC91FF7B76300CE691A /* CurveSampleViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CurveSampleViewController.storyboard; sourceTree = ""; }; E7D399111F44A4D1006AF039 /* ParticlesSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticlesSampleView.swift; sourceTree = ""; }; E7D399131F44A505006AF039 /* ParticlesSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticlesSampleViewController.swift; sourceTree = ""; }; E7F3BA7C1F44880200EFB169 /* TextSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextSampleViewController.swift; sourceTree = ""; }; E7F3BA7E1F44880F00EFB169 /* RectSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RectSampleViewController.swift; sourceTree = ""; }; E7F3BA801F44881A00EFB169 /* EllipseSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EllipseSampleViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ E74331041F34C6AB00D20482 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E747DD961F432F14006BAC6A /* ProcessingKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ E7054ACD1F34CA9D00EA0C0F /* Frameworks */ = { isa = PBXGroup; children = ( E7054ACF1F34CA9D00EA0C0F /* SpriteKit.framework */, ); name = Frameworks; sourceTree = ""; }; E74330FE1F34C6AB00D20482 = { isa = PBXGroup; children = ( E7054ACD1F34CA9D00EA0C0F /* Frameworks */, E74331091F34C6AB00D20482 /* ProcessingKitExample */, E74331081F34C6AB00D20482 /* Products */, E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */, ); sourceTree = ""; }; E74331081F34C6AB00D20482 /* Products */ = { isa = PBXGroup; children = ( E74331071F34C6AB00D20482 /* ProcessingKitExample.app */, ); name = Products; sourceTree = ""; }; E74331091F34C6AB00D20482 /* ProcessingKitExample */ = { isa = PBXGroup; children = ( E7F3BA7A1F4487A500EFB169 /* BasicFunctions */, E747DDBA1F447D68006BAC6A /* Extensions */, E7D3990D1F44A480006AF039 /* OthersSample */, E747DDB31F44730D006BAC6A /* TouchSample */, E743310A1F34C6AB00D20482 /* AppDelegate.swift */, E74331111F34C6AB00D20482 /* Assets.xcassets */, E74331161F34C6AB00D20482 /* Info.plist */, E74331131F34C6AB00D20482 /* LaunchScreen.storyboard */, E743310E1F34C6AB00D20482 /* Main.storyboard */, E747DDB11F446A81006BAC6A /* MainTableViewController.swift */, ); path = ProcessingKitExample; sourceTree = ""; }; E747DD891F432E9B006BAC6A /* Products */ = { isa = PBXGroup; children = ( E747DD8E1F432E9C006BAC6A /* ProcessingKit.framework */, E747DD901F432E9C006BAC6A /* ProcessingKitTests.xctest */, E7E79BDA2008674B003CDAC5 /* ProcessingKit.framework */, E7B2F729214555F2003B642A /* ProcessingKitCore.framework */, E7B2F72B214555F2003B642A /* ProcessingKitCoreOSX.framework */, ); name = Products; sourceTree = ""; }; E747DDB31F44730D006BAC6A /* TouchSample */ = { isa = PBXGroup; children = ( E7054AD61F34D36200EA0C0F /* TouchSampleView.swift */, E747DDB41F447322006BAC6A /* TouchSampleViewController.storyboard */, E747DDB61F447335006BAC6A /* TouchSampleViewController.swift */, ); path = TouchSample; sourceTree = ""; }; E747DDBA1F447D68006BAC6A /* Extensions */ = { isa = PBXGroup; children = ( E747DDB81F4473E8006BAC6A /* ViewController.swift */, ); path = Extensions; sourceTree = ""; }; E7D3990D1F44A480006AF039 /* OthersSample */ = { isa = PBXGroup; children = ( E72A2AB41F7F96020044F879 /* ClockSampleView.swift */, E72A2AB11F7F95F50044F879 /* ClockSampleViewController.storyboard */, E72A2AB61F7F961A0044F879 /* ClockSampleViewController.swift */, E7D399111F44A4D1006AF039 /* ParticlesSampleView.swift */, E71779F71F4C60A2004243F2 /* ParticlesSampleViewController.storyboard */, E7D399131F44A505006AF039 /* ParticlesSampleViewController.swift */, ); path = OthersSample; sourceTree = ""; }; E7F3BA7A1F4487A500EFB169 /* BasicFunctions */ = { isa = PBXGroup; children = ( E71388DA1F7956B700A45FA6 /* ArcSampleView.swift */, E71388D81F79569900A45FA6 /* ArcSampleViewController.storyboard */, E71388D51F79568F00A45FA6 /* ArcSampleViewController.swift */, E70595201F44899E005C8856 /* EllipseSampleView.swift */, E71779FE1F4C6195004243F2 /* EllipseSampleViewController.storyboard */, E7F3BA801F44881A00EFB169 /* EllipseSampleViewController.swift */, E76820061F7AAEB4009E8FD2 /* ImageSampleView.swift */, E768200A1F7AAF0D009E8FD2 /* ImageSampleViewController.storyboard */, E76820081F7AAEE1009E8FD2 /* ImageSampleViewController.swift */, E70595241F4489B8005C8856 /* RectSampleView.swift */, E71779FA1F4C6169004243F2 /* RectSampleViewController.storyboard */, E7F3BA7E1F44880F00EFB169 /* RectSampleViewController.swift */, E70595221F4489AA005C8856 /* TextSampleView.swift */, E71779FC1F4C617E004243F2 /* TextSampleViewController.storyboard */, E7F3BA7C1F44880200EFB169 /* TextSampleViewController.swift */, E77AEFE21FF684F600B97406 /* TriangleSampleView.swift */, E77AEFDD1FF684C600B97406 /* TriangleSampleViewController.storyboard */, E77AEFE01FF684E900B97406 /* TriangleSampleViewController.swift */, E77AEFEF1FF68B0200B97406 /* QuadSampleView.swift */, E77AEFED1FF68AF300B97406 /* QuadSampleViewController.storyboard */, E77AEFE81FF68ACB00B97406 /* QuadSampleViewController.swift */, E7B77DC71FF7B75500CE691A /* CurveSampleView.swift */, E7B77DC91FF7B76300CE691A /* CurveSampleViewController.storyboard */, E7B77DC41FF7B74100CE691A /* CurveSampleViewController.swift */, ); path = BasicFunctions; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ E74331061F34C6AB00D20482 /* ProcessingKitExample */ = { isa = PBXNativeTarget; buildConfigurationList = E74331191F34C6AB00D20482 /* Build configuration list for PBXNativeTarget "ProcessingKitExample" */; buildPhases = ( E74331031F34C6AB00D20482 /* Sources */, E74331041F34C6AB00D20482 /* Frameworks */, E74331051F34C6AB00D20482 /* Resources */, E747DD9A1F432F14006BAC6A /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( E747DD991F432F14006BAC6A /* PBXTargetDependency */, ); name = ProcessingKitExample; productName = ProcessingKitExample; productReference = E74331071F34C6AB00D20482 /* ProcessingKitExample.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ E74330FF1F34C6AB00D20482 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Atsuya Sato"; TargetAttributes = { E74331061F34C6AB00D20482 = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = DEQGLB9PU4; LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = E74331021F34C6AB00D20482 /* Build configuration list for PBXProject "ProcessingKitExample" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = E74330FE1F34C6AB00D20482; productRefGroup = E74331081F34C6AB00D20482 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = E747DD891F432E9B006BAC6A /* Products */; ProjectRef = E747DD881F432E9B006BAC6A /* ProcessingKit.xcodeproj */; }, ); projectRoot = ""; targets = ( E74331061F34C6AB00D20482 /* ProcessingKitExample */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ E747DD8E1F432E9C006BAC6A /* ProcessingKit.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKit.framework; remoteRef = E747DD8D1F432E9C006BAC6A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E747DD901F432E9C006BAC6A /* ProcessingKitTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; path = ProcessingKitTests.xctest; remoteRef = E747DD8F1F432E9C006BAC6A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E7B2F729214555F2003B642A /* ProcessingKitCore.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKitCore.framework; remoteRef = E7B2F728214555F2003B642A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E7B2F72B214555F2003B642A /* ProcessingKitCoreOSX.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKitCoreOSX.framework; remoteRef = E7B2F72A214555F2003B642A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E7E79BDA2008674B003CDAC5 /* ProcessingKit.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKit.framework; remoteRef = E7E79BD92008674B003CDAC5 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ E74331051F34C6AB00D20482 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( E71779FD1F4C617E004243F2 /* TextSampleViewController.storyboard in Resources */, E77AEFEE1FF68AF300B97406 /* QuadSampleViewController.storyboard in Resources */, E71388D91F79569900A45FA6 /* ArcSampleViewController.storyboard in Resources */, E7B77DCA1FF7B76300CE691A /* CurveSampleViewController.storyboard in Resources */, E74331151F34C6AB00D20482 /* LaunchScreen.storyboard in Resources */, E71779FB1F4C6169004243F2 /* RectSampleViewController.storyboard in Resources */, E74331121F34C6AB00D20482 /* Assets.xcassets in Resources */, E77AEFDE1FF684C600B97406 /* TriangleSampleViewController.storyboard in Resources */, E71779FF1F4C6195004243F2 /* EllipseSampleViewController.storyboard in Resources */, E768200B1F7AAF87009E8FD2 /* ImageSampleViewController.storyboard in Resources */, E74331101F34C6AB00D20482 /* Main.storyboard in Resources */, E747DDB51F447322006BAC6A /* TouchSampleViewController.storyboard in Resources */, E71779F81F4C60A2004243F2 /* ParticlesSampleViewController.storyboard in Resources */, E72A2AB21F7F95F50044F879 /* ClockSampleViewController.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ E74331031F34C6AB00D20482 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E7B77DC81FF7B75500CE691A /* CurveSampleView.swift in Sources */, E747DDB21F446A81006BAC6A /* MainTableViewController.swift in Sources */, E72A2AB51F7F96020044F879 /* ClockSampleView.swift in Sources */, E71388DB1F7956B700A45FA6 /* ArcSampleView.swift in Sources */, E7F3BA811F44881A00EFB169 /* EllipseSampleViewController.swift in Sources */, E76820071F7AAEB4009E8FD2 /* ImageSampleView.swift in Sources */, E7054AD71F34D36200EA0C0F /* TouchSampleView.swift in Sources */, E7D399141F44A505006AF039 /* ParticlesSampleViewController.swift in Sources */, E70595211F44899E005C8856 /* EllipseSampleView.swift in Sources */, E7B77DC51FF7B74100CE691A /* CurveSampleViewController.swift in Sources */, E77AEFE11FF684E900B97406 /* TriangleSampleViewController.swift in Sources */, E70595231F4489AA005C8856 /* TextSampleView.swift in Sources */, E77AEFF01FF68B0200B97406 /* QuadSampleView.swift in Sources */, E76820091F7AAEE1009E8FD2 /* ImageSampleViewController.swift in Sources */, E77AEFE91FF68ACB00B97406 /* QuadSampleViewController.swift in Sources */, E747DDB91F4473E8006BAC6A /* ViewController.swift in Sources */, E77AEFE31FF684F600B97406 /* TriangleSampleView.swift in Sources */, E7D399121F44A4D1006AF039 /* ParticlesSampleView.swift in Sources */, E7F3BA7F1F44880F00EFB169 /* RectSampleViewController.swift in Sources */, E72A2AB71F7F961A0044F879 /* ClockSampleViewController.swift in Sources */, E747DDB71F447335006BAC6A /* TouchSampleViewController.swift in Sources */, E7F3BA7D1F44880200EFB169 /* TextSampleViewController.swift in Sources */, E71388D61F79568F00A45FA6 /* ArcSampleViewController.swift in Sources */, E70595251F4489B8005C8856 /* RectSampleView.swift in Sources */, E743310B1F34C6AB00D20482 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ E747DD991F432F14006BAC6A /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = ProcessingKit; targetProxy = E747DD981F432F14006BAC6A /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ E743310E1F34C6AB00D20482 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( E743310F1F34C6AB00D20482 /* Base */, ); name = Main.storyboard; path = .; sourceTree = ""; }; E74331131F34C6AB00D20482 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( E74331141F34C6AB00D20482 /* Base */, ); name = LaunchScreen.storyboard; path = .; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ E74331171F34C6AB00D20482 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; E74331181F34C6AB00D20482 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; }; E743311A1F34C6AB00D20482 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = "$(SRCROOT)/ProcessingKitExample/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; E743311B1F34C6AB00D20482 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = "$(SRCROOT)/ProcessingKitExample/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ E74331021F34C6AB00D20482 /* Build configuration list for PBXProject "ProcessingKitExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E74331171F34C6AB00D20482 /* Debug */, E74331181F34C6AB00D20482 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E74331191F34C6AB00D20482 /* Build configuration list for PBXNativeTarget "ProcessingKitExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E743311A1F34C6AB00D20482 /* Debug */, E743311B1F34C6AB00D20482 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = E74330FF1F34C6AB00D20482 /* Project object */; } ================================================ FILE: ProcessingKitExample/ProcessingKitExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: ProcessingKitExample/ProcessingKitExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/AppDelegate.swift ================================================ // // AppDelegate.swift // ProcessingKitOSXExample // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { // Insert code here to initialize your application } func applicationWillTerminate(_ aNotification: Notification) { // Insert code here to tear down your application } } ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "mac", "size" : "16x16", "scale" : "1x" }, { "idiom" : "mac", "size" : "16x16", "scale" : "2x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "1x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "2x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "1x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "2x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "1x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "2x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "1x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/Base.lproj/Main.storyboard ================================================ Default Left to Right Right to Left Default Left to Right Right to Left ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/CustomView.swift ================================================ // // CustomView.swift // ProcessingKitOSXExample // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Foundation import ProcessingKit import Cocoa class CustomView: ProcessingView { func draw() { background(NSColor.white) fill(NSColor.blue) ellipse(mouseX, mouseY, 100, 100) } } ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleVersion 1 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright Copyright © 2017年 Atsuya Sato. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass NSApplication ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/ProcessingKitOSXExample.entitlements ================================================ com.apple.security.app-sandbox com.apple.security.files.user-selected.read-only ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample/ViewController.swift ================================================ // // ViewController.swift // ProcessingKitOSXExample // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import Cocoa class ViewController: NSViewController { @IBOutlet weak var customView: CustomView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } } ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ E72410561FF89A2200FBF78D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72410551FF89A2200FBF78D /* AppDelegate.swift */; }; E72410581FF89A2200FBF78D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72410571FF89A2200FBF78D /* ViewController.swift */; }; E724105A1FF89A2200FBF78D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E72410591FF89A2200FBF78D /* Assets.xcassets */; }; E724105D1FF89A2200FBF78D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E724105B1FF89A2200FBF78D /* Main.storyboard */; }; E72410691FF89A2200FBF78D /* ProcessingKitOSXExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72410681FF89A2200FBF78D /* ProcessingKitOSXExampleTests.swift */; }; E72410801FF89A5000FBF78D /* ProcessingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E724107E1FF89A3400FBF78D /* ProcessingKit.framework */; }; E72410811FF89A5000FBF78D /* ProcessingKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E724107E1FF89A3400FBF78D /* ProcessingKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E72410861FF89AD100FBF78D /* CustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72410851FF89AD100FBF78D /* CustomView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ E72410651FF89A2200FBF78D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E724104A1FF89A2200FBF78D /* Project object */; proxyType = 1; remoteGlobalIDString = E72410511FF89A2200FBF78D; remoteInfo = ProcessingKitOSXExample; }; E72410791FF89A3400FBF78D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7212F401F34B5A600173CD8; remoteInfo = ProcessingKit; }; E724107B1FF89A3400FBF78D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7212F491F34B5A600173CD8; remoteInfo = ProcessingKitTests; }; E724107D1FF89A3400FBF78D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B77DD31FF7E02900CE691A; remoteInfo = "ProcessingKit OSX"; }; E72410821FF89A5000FBF78D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 1; remoteGlobalIDString = E7B77DD21FF7E02900CE691A; remoteInfo = "ProcessingKit OSX"; }; E7B2F7322145586C003B642A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B2F67A21454010003B642A; remoteInfo = ProcessingKitCore; }; E7B2F7342145586C003B642A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; proxyType = 2; remoteGlobalIDString = E7B2F70F214553BF003B642A; remoteInfo = ProcessingKitCoreOSX; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ E72410841FF89A5000FBF78D /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( E72410811FF89A5000FBF78D /* ProcessingKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ E72410521FF89A2200FBF78D /* ProcessingKitOSXExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProcessingKitOSXExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; E72410551FF89A2200FBF78D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E72410571FF89A2200FBF78D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; E72410591FF89A2200FBF78D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E724105C1FF89A2200FBF78D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; E724105E1FF89A2200FBF78D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E724105F1FF89A2200FBF78D /* ProcessingKitOSXExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ProcessingKitOSXExample.entitlements; sourceTree = ""; }; E72410641FF89A2200FBF78D /* ProcessingKitOSXExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProcessingKitOSXExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E72410681FF89A2200FBF78D /* ProcessingKitOSXExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessingKitOSXExampleTests.swift; sourceTree = ""; }; E724106A1FF89A2200FBF78D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ProcessingKit.xcodeproj; path = ../ProcessingKit.xcodeproj; sourceTree = ""; }; E72410851FF89AD100FBF78D /* CustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ E724104F1FF89A2200FBF78D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E72410801FF89A5000FBF78D /* ProcessingKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E72410611FF89A2200FBF78D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ E72410491FF89A2200FBF78D = { isa = PBXGroup; children = ( E72410541FF89A2200FBF78D /* ProcessingKitOSXExample */, E72410671FF89A2200FBF78D /* ProcessingKitOSXExampleTests */, E72410531FF89A2200FBF78D /* Products */, E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */, ); sourceTree = ""; }; E72410531FF89A2200FBF78D /* Products */ = { isa = PBXGroup; children = ( E72410521FF89A2200FBF78D /* ProcessingKitOSXExample.app */, E72410641FF89A2200FBF78D /* ProcessingKitOSXExampleTests.xctest */, ); name = Products; sourceTree = ""; }; E72410541FF89A2200FBF78D /* ProcessingKitOSXExample */ = { isa = PBXGroup; children = ( E72410551FF89A2200FBF78D /* AppDelegate.swift */, E72410571FF89A2200FBF78D /* ViewController.swift */, E72410851FF89AD100FBF78D /* CustomView.swift */, E72410591FF89A2200FBF78D /* Assets.xcassets */, E724105B1FF89A2200FBF78D /* Main.storyboard */, E724105E1FF89A2200FBF78D /* Info.plist */, E724105F1FF89A2200FBF78D /* ProcessingKitOSXExample.entitlements */, ); path = ProcessingKitOSXExample; sourceTree = ""; }; E72410671FF89A2200FBF78D /* ProcessingKitOSXExampleTests */ = { isa = PBXGroup; children = ( E72410681FF89A2200FBF78D /* ProcessingKitOSXExampleTests.swift */, E724106A1FF89A2200FBF78D /* Info.plist */, ); path = ProcessingKitOSXExampleTests; sourceTree = ""; }; E72410741FF89A3300FBF78D /* Products */ = { isa = PBXGroup; children = ( E724107A1FF89A3400FBF78D /* ProcessingKit.framework */, E724107C1FF89A3400FBF78D /* ProcessingKitTests.xctest */, E724107E1FF89A3400FBF78D /* ProcessingKit.framework */, E7B2F7332145586C003B642A /* ProcessingKitCore.framework */, E7B2F7352145586C003B642A /* ProcessingKitCoreOSX.framework */, ); name = Products; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ E72410511FF89A2200FBF78D /* ProcessingKitOSXExample */ = { isa = PBXNativeTarget; buildConfigurationList = E724106D1FF89A2200FBF78D /* Build configuration list for PBXNativeTarget "ProcessingKitOSXExample" */; buildPhases = ( E724104E1FF89A2200FBF78D /* Sources */, E724104F1FF89A2200FBF78D /* Frameworks */, E72410501FF89A2200FBF78D /* Resources */, E72410841FF89A5000FBF78D /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( E72410831FF89A5000FBF78D /* PBXTargetDependency */, ); name = ProcessingKitOSXExample; productName = ProcessingKitOSXExample; productReference = E72410521FF89A2200FBF78D /* ProcessingKitOSXExample.app */; productType = "com.apple.product-type.application"; }; E72410631FF89A2200FBF78D /* ProcessingKitOSXExampleTests */ = { isa = PBXNativeTarget; buildConfigurationList = E72410701FF89A2200FBF78D /* Build configuration list for PBXNativeTarget "ProcessingKitOSXExampleTests" */; buildPhases = ( E72410601FF89A2200FBF78D /* Sources */, E72410611FF89A2200FBF78D /* Frameworks */, E72410621FF89A2200FBF78D /* Resources */, ); buildRules = ( ); dependencies = ( E72410661FF89A2200FBF78D /* PBXTargetDependency */, ); name = ProcessingKitOSXExampleTests; productName = ProcessingKitOSXExampleTests; productReference = E72410641FF89A2200FBF78D /* ProcessingKitOSXExampleTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ E724104A1FF89A2200FBF78D /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Atsuya Sato"; TargetAttributes = { E72410511FF89A2200FBF78D = { CreatedOnToolsVersion = 9.1; LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; E72410631FF89A2200FBF78D = { CreatedOnToolsVersion = 9.1; LastSwiftMigration = 1010; ProvisioningStyle = Automatic; TestTargetID = E72410511FF89A2200FBF78D; }; }; }; buildConfigurationList = E724104D1FF89A2200FBF78D /* Build configuration list for PBXProject "ProcessingKitOSXExample" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = E72410491FF89A2200FBF78D; productRefGroup = E72410531FF89A2200FBF78D /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = E72410741FF89A3300FBF78D /* Products */; ProjectRef = E72410731FF89A3300FBF78D /* ProcessingKit.xcodeproj */; }, ); projectRoot = ""; targets = ( E72410511FF89A2200FBF78D /* ProcessingKitOSXExample */, E72410631FF89A2200FBF78D /* ProcessingKitOSXExampleTests */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ E724107A1FF89A3400FBF78D /* ProcessingKit.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKit.framework; remoteRef = E72410791FF89A3400FBF78D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E724107C1FF89A3400FBF78D /* ProcessingKitTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; path = ProcessingKitTests.xctest; remoteRef = E724107B1FF89A3400FBF78D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E724107E1FF89A3400FBF78D /* ProcessingKit.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKit.framework; remoteRef = E724107D1FF89A3400FBF78D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E7B2F7332145586C003B642A /* ProcessingKitCore.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKitCore.framework; remoteRef = E7B2F7322145586C003B642A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; E7B2F7352145586C003B642A /* ProcessingKitCoreOSX.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = ProcessingKitCoreOSX.framework; remoteRef = E7B2F7342145586C003B642A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ E72410501FF89A2200FBF78D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( E724105A1FF89A2200FBF78D /* Assets.xcassets in Resources */, E724105D1FF89A2200FBF78D /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; E72410621FF89A2200FBF78D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ E724104E1FF89A2200FBF78D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E72410861FF89AD100FBF78D /* CustomView.swift in Sources */, E72410581FF89A2200FBF78D /* ViewController.swift in Sources */, E72410561FF89A2200FBF78D /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E72410601FF89A2200FBF78D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E72410691FF89A2200FBF78D /* ProcessingKitOSXExampleTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ E72410661FF89A2200FBF78D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E72410511FF89A2200FBF78D /* ProcessingKitOSXExample */; targetProxy = E72410651FF89A2200FBF78D /* PBXContainerItemProxy */; }; E72410831FF89A5000FBF78D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "ProcessingKit OSX"; targetProxy = E72410821FF89A5000FBF78D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ E724105B1FF89A2200FBF78D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( E724105C1FF89A2200FBF78D /* Base */, ); name = Main.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ E724106B1FF89A2200FBF78D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; E724106C1FF89A2200FBF78D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; }; name = Release; }; E724106E1FF89A2200FBF78D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ProcessingKitOSXExample/ProcessingKitOSXExample.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = ProcessingKitOSXExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitOSXExample; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.2; }; name = Debug; }; E724106F1FF89A2200FBF78D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ProcessingKitOSXExample/ProcessingKitOSXExample.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = ProcessingKitOSXExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitOSXExample; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.2; }; name = Release; }; E72410711FF89A2200FBF78D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = ProcessingKitOSXExampleTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitOSXExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProcessingKitOSXExample.app/Contents/MacOS/ProcessingKitOSXExample"; }; name = Debug; }; E72410721FF89A2200FBF78D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = DEQGLB9PU4; INFOPLIST_FILE = ProcessingKitOSXExampleTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.github.natmark.ProcessingKitOSXExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProcessingKitOSXExample.app/Contents/MacOS/ProcessingKitOSXExample"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ E724104D1FF89A2200FBF78D /* Build configuration list for PBXProject "ProcessingKitOSXExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E724106B1FF89A2200FBF78D /* Debug */, E724106C1FF89A2200FBF78D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E724106D1FF89A2200FBF78D /* Build configuration list for PBXNativeTarget "ProcessingKitOSXExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E724106E1FF89A2200FBF78D /* Debug */, E724106F1FF89A2200FBF78D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; E72410701FF89A2200FBF78D /* Build configuration list for PBXNativeTarget "ProcessingKitOSXExampleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( E72410711FF89A2200FBF78D /* Debug */, E72410721FF89A2200FBF78D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = E724104A1FF89A2200FBF78D /* Project object */; } ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExampleTests/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleVersion 1 ================================================ FILE: ProcessingKitOSXExample/ProcessingKitOSXExampleTests/ProcessingKitOSXExampleTests.swift ================================================ // // ProcessingKitOSXExampleTests.swift // ProcessingKitOSXExampleTests // // Created by AtsuyaSato on 2017/12/31. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKitOSXExample class ProcessingKitOSXExampleTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } } ================================================ FILE: ProcessingKitTests/CGPath+Extension/CGPath+Extension.swift ================================================ // // CGPath+Extension.swift // ProcessingKitTests // // Created by AtsuyaSato on 2019/01/31. // Copyright © 2019 Atsuya Sato. All rights reserved. // import CoreGraphics extension CGPath: Equatable { public static func ==(lhs: CGPath, rhs: CGPath) -> Bool { if lhs.getPathElementsPoints().count != rhs.getPathElementsPoints().count { return false } if lhs.firstPoint != rhs.firstPoint { return false } if lhs.currentPoint != rhs.currentPoint { return false } for i in 0.. Void) { typealias Body = @convention(block) (CGPathElement) -> Void let callback: @convention(c) (UnsafeMutableRawPointer, UnsafePointer) -> Void = { (info, element) in let body = unsafeBitCast(info, to: Body.self) body(element.pointee) } //print(MemoryLayout.size(ofValue: body)) let unsafeBody = unsafeBitCast(body, to: UnsafeMutableRawPointer.self) self.apply(info: unsafeBody, function: unsafeBitCast(callback, to: CGPathApplierFunction.self)) } func getPathElementsPoints() -> [CGPoint] { var arrayPoints : [CGPoint]! = [CGPoint]() self.forEach { element in switch (element.type) { case CGPathElementType.moveToPoint: arrayPoints.append(element.points[0]) case .addLineToPoint: arrayPoints.append(element.points[0]) case .addQuadCurveToPoint: arrayPoints.append(element.points[0]) arrayPoints.append(element.points[1]) case .addCurveToPoint: arrayPoints.append(element.points[0]) arrayPoints.append(element.points[1]) arrayPoints.append(element.points[2]) default: break } } return arrayPoints } func getPathElementsPointsAndTypes() -> ([CGPoint],[CGPathElementType]) { var arrayPoints : [CGPoint]! = [CGPoint]() var arrayTypes : [CGPathElementType]! = [CGPathElementType]() self.forEach { element in switch (element.type) { case CGPathElementType.moveToPoint: arrayPoints.append(element.points[0]) arrayTypes.append(element.type) case .addLineToPoint: arrayPoints.append(element.points[0]) arrayTypes.append(element.type) case .addQuadCurveToPoint: arrayPoints.append(element.points[0]) arrayPoints.append(element.points[1]) arrayTypes.append(element.type) arrayTypes.append(element.type) case .addCurveToPoint: arrayPoints.append(element.points[0]) arrayPoints.append(element.points[1]) arrayPoints.append(element.points[2]) arrayTypes.append(element.type) arrayTypes.append(element.type) arrayTypes.append(element.type) default: break } } return (arrayPoints,arrayTypes) } } ================================================ FILE: ProcessingKitTests/GestureTests.swift ================================================ // // EventTests.swift // ProcessingKitTests // // Created by AtsuyaSato on 2018/07/04. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit class GestureTests: XCTestCase { func testFingerPressed() { let view = ProcessingView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) XCTAssertEqual(view.fingerPressed, false) view.didTap(recognizer: view.tapGestureWithSingleTouch) XCTAssertEqual(view.fingerPressed, true) } } ================================================ FILE: ProcessingKitTests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleVersion 1 ================================================ FILE: ProcessingKitTests/Input/DateTests.swift ================================================ // // DateTests.swift // ProcessingKitTests // // Created by AtsuyaSato on 2017/09/27. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit class DateTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func testDateValue() { var components = DateComponents() components.year = 2017 components.month = 5 components.day = 20 components.hour = 22 components.minute = 50 components.second = 10 let calendar = Calendar(identifier: .gregorian) let date = calendar.date(from: components) guard let currentDate = date else { XCTFail() return } let dateModel = DateModel(startDate: Date(), currentDate: currentDate) XCTAssertEqual(dateModel.year(), 2017) XCTAssertEqual(dateModel.month(), 5) XCTAssertEqual(dateModel.day(), 20) XCTAssertEqual(dateModel.hour(), 22) XCTAssertEqual(dateModel.minute(), 50) XCTAssertEqual(dateModel.second(), 10) } } ================================================ FILE: ProcessingKitTests/ProcessingViewDelegateSpy.swift ================================================ // // ProcessingViewDelegateSpy.swift // ProcessingKitTests // // Created by AtsuyaSato on 2017/09/26. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit class ProcessingViewDelegateSetupSpy: ProcessingViewDelegate { private let exception: XCTestExpectation private(set) var spyHistory: [Any] = [] init(exception: XCTestExpectation) { self.exception = exception } func setup() { self.record(()) exception.fulfill() } private func record(_ args: Void) { self.spyHistory += [args] } } class ProcessingViewDelegateDrawSpy: ProcessingViewDelegate { private let exception: XCTestExpectation private(set) var spyHistory: [Any] = [] init(exception: XCTestExpectation) { self.exception = exception } func setup() { self.record(()) } func draw() { self.record(()) exception.fulfill() } private func record(_ args: Void) { self.spyHistory += [args] } } ================================================ FILE: ProcessingKitTests/ProcessingViewTests.swift ================================================ // // ProcessingViewTests.swift // ProcessingViewTests // // Created by AtsuyaSato on 2017/08/04. // Copyright © 2017年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit class ProcessingViewTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func testCallSetup() { let view = ProcessingView(frame: CGRect.zero) let processingViewDelegateSpy = ProcessingViewDelegateSetupSpy(exception: expectation(description: "Setup") ) view.delegate = processingViewDelegateSpy waitForExpectations(timeout: 100) XCTAssertEqual(processingViewDelegateSpy.spyHistory.count, 1) } func testCallDraw() { let view = ProcessingView(frame: CGRect.zero) let processingViewDelegateSpy = ProcessingViewDelegateDrawSpy(exception: expectation(description: "Draw") ) view.delegate = processingViewDelegateSpy waitForExpectations(timeout: 100) print(processingViewDelegateSpy.spyHistory.count) XCTAssertEqual(processingViewDelegateSpy.spyHistory.count, 2) } } ================================================ FILE: ProcessingKitTests/ShapeTests.swift ================================================ // // ShapeTests.swift // ProcessingKitTests // // Created by AtsuyaSato on 2018/01/29. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit struct TestCase { let description: String let shape: Shape let expect: CGPath? } enum Shape { case point(x: CGFloat, y: CGFloat) case line(x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat) case rect(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat) case roundedRect(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat, topLeftRadius: CGFloat, topRightRadius: CGFloat, bottomLeftRadius: CGFloat, bottomRightRadius: CGFloat) case ellipse(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat) case arc(x: CGFloat, y: CGFloat, radius: CGFloat, start: CGFloat, stop: CGFloat) case triangle(x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat, x3: CGFloat, y3: CGFloat) case quad(x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat, x3: CGFloat, y3: CGFloat, x4: CGFloat, y4: CGFloat) case curve(cpx1: CGFloat, cpy1: CGFloat, x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat, cpx2: CGFloat, cpy2: CGFloat) case bezier(x1: CGFloat, y1: CGFloat, cpx1: CGFloat, cpy1: CGFloat, cpx2: CGFloat, cpy2: CGFloat, x2: CGFloat, y2: CGFloat) } class ProcessingViewDelegateShapeSpy: ProcessingViewDelegate { private let exception: XCTestExpectation private let view: ProcessingView private let shape: Shape private(set) var context: CGContext? init(exception: XCTestExpectation, view: ProcessingView, shape: Shape) { self.exception = exception self.view = view self.shape = shape } func setup() { switch shape { case .point(let x, let y): self.view.point(x, y) case .line(let x1, let y1, let x2, let y2): self.view.line(x1, y1, x2, y2) case .rect(let x, let y, let width, let height): self.view.rect(x, y, width, height) case .roundedRect(let x, let y, let width, let height, let topLeftRadius, let topRightRadius, let bottomLeftRadius, let bottomRightRadius): self.view.rect(x, y, width, height, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius) case .ellipse(let x, let y, let width, let height): self.view.ellipse(x, y, width, height) case .arc(let x, let y, let radius, let start, let stop): self.view.arc(x, y, radius, start, stop) case .triangle(let x1, let y1, let x2, let y2, let x3, let y3): self.view.triangle(x1, y1, x2, y2, x3, y3) case .quad(let x1, let y1, let x2, let y2, let x3, let y3, let x4, let y4): self.view.quad(x1, y1, x2, y2, x3, y3, x4, y4) case .curve(let cpx1, let cpy1, let x1, let y1, let x2, let y2, let cpx2, let cpy2): self.view.curve(cpx1, cpy1, x1, y1, x2, y2, cpx2, cpy2) case .bezier(let x1, let y1, let cpx1, let cpy1, let cpx2, let cpy2, let x2, let y2): self.view.bezier(x1, y1, cpx1, cpy1, cpx2, cpy2, x2, y2) } self.record(UIGraphicsGetCurrentContext()) exception.fulfill() } private func record(_ arg: CGContext?) { self.context = arg } } class ShapeTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func testPoint() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw point(50, 50)", shape: .point(x: 50, y: 50), expect: UIBezierPath(ovalIn: CGRect(x: 49.5, y: 49.5, width: 1, height: 1)).cgPath ), ] check(testCases: testCases) } func testLine() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw line(0, 0, 100, 100)", shape: .line(x1: 0, y1: 0, x2: 100, y2: 100), expect: UIBezierPath() .moveTo(CGPoint(x: 0, y: 0)) .addLineTo(CGPoint(x: 100, y: 100)) .cgPath ), #line: TestCase( description: "draw line(50, 50, -50, -50)", shape: .line(x1: 50, y1: 50, x2: -50, y2: -50), expect: UIBezierPath() .moveTo(CGPoint(x: 50, y: 50)) .addLineTo(CGPoint(x: -50, y: -50)) .cgPath ), ] check(testCases: testCases) } func testRect() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw rect(0, 0, 50, 50)", shape: .rect(x: 0, y: 0, width: 50, height: 50), expect: UIBezierPath(rect: CGRect(x: 0, y: 0, width: 50, height: 50)).cgPath ), #line: TestCase( description: "draw rect(20, 20, 30, 50)", shape: .rect(x: 20, y: 20, width: 30, height: 50), expect: UIBezierPath(rect: CGRect(x: 20, y: 20, width: 30, height: 50)).cgPath ), #line: TestCase( description: "draw rounded rect(10, 10, 50, 50, 10, 0, 0, 0)", shape: .roundedRect(x: 10, y: 10, width: 50, height: 50, topLeftRadius: 5, topRightRadius: 0, bottomLeftRadius: 0, bottomRightRadius: 0), expect: roundedRectPathBuilder(x: 10, y: 10, width: 50, height: 50, topLeftRadius: 5, topRightRadius: 0, bottomLeftRadius: 0, bottomRightRadius: 0) ), #line: TestCase( description: "draw rounded rect(10, 10, 50, 50, 50, 10, 10, 10)", shape: .roundedRect(x: 10, y: 10, width: 50, height: 50, topLeftRadius: 50, topRightRadius: 10, bottomLeftRadius: 10, bottomRightRadius: 10), expect: roundedRectPathBuilder(x: 10, y: 10, width: 50, height: 50, topLeftRadius: 25, topRightRadius: 10, bottomLeftRadius: 10, bottomRightRadius: 10) ), ] check(testCases: testCases) } func testElipse() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw ellipse(100, 100, 100, 100)", shape: .ellipse(x: 100, y: 100, width: 100, height: 100), expect: UIBezierPath(ovalIn: CGRect(x: 50, y: 50, width: 100, height: 100)).cgPath ), #line: TestCase( description: "draw ellipse(0, 0, 100, 100)", shape: .ellipse(x: 0, y: 0, width: 100, height: 100), expect: UIBezierPath(ovalIn: CGRect(x: -50, y: -50, width: 100, height: 100)).cgPath ), ] check(testCases: testCases) } func testArc() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw arc(50, 50, 50, 0°, 90°)", shape: .arc(x: 50, y: 50, radius: 50, start: radians(0), stop: radians(90.0)), expect: arcPathBuilder(x: 50, y: 50, radius: 50, start: radians(0), stop: radians(90.0), clockwise: false) ), #line: TestCase( description: "draw arc(50, 50, 30, 30°, 120°)", shape: .arc(x: 50, y: 50, radius: 30, start: radians(30.0), stop: radians(120.0)), expect: arcPathBuilder(x: 50, y: 50, radius: 30, start: radians(30.0), stop: radians(120.0), clockwise: false) ), ] check(testCases: testCases) } func testTriangle() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw triangle(50, 0, 0, 100, 100, 100)", shape: .triangle(x1: 50, y1: 0, x2: 0, y2: 100, x3: 100, y3: 100), expect: UIBezierPath() .moveTo(CGPoint(x: 50, y: 0)) .addLineTo(CGPoint(x: 0, y: 100)) .addLineTo(CGPoint(x: 100, y: 100)) .closePath() .cgPath ), ] check(testCases: testCases) } func testQuad() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw triangle(0, 0, 30, 0, 100, 100, 40, 50)", shape: .quad(x1: 0, y1: 0, x2: 30, y2: 0, x3: 100, y3: 100, x4: 40, y4: 50), expect: UIBezierPath() .moveTo(CGPoint(x: 0, y: 0)) .addLineTo(CGPoint(x: 30, y: 0)) .addLineTo(CGPoint(x: 100, y: 100)) .addLineTo(CGPoint(x: 40, y: 50)) .closePath() .cgPath ), ] check(testCases: testCases) } func testCurve() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw curve(40, 40, 80, 60, 100, 100, 60, 120)", shape: .curve(cpx1: 40, cpy1: 40, x1: 80, y1: 60, x2: 100, y2: 100, cpx2: 60, cpy2: 120), expect: curvePathBuilder(cpx1: 40, cpy1: 40, x1: 80, y1: 60, x2: 100, y2: 100, cpx2: 60, cpy2: 120) ), ] check(testCases: testCases) } func testBezier() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "draw bezier(40, 40, 80, 60, 100, 100, 60, 120)", shape: .bezier(x1: 40, y1: 40, cpx1: 80, cpy1: 60, cpx2: 100, cpy2: 100, x2: 60, y2: 120), expect: bezierPathBuilder(x1: 40, y1: 40, cpx1: 80, cpy1: 60, cpx2: 100, cpy2: 100, x2: 60, y2: 120) ), ] check(testCases: testCases) } func check(testCases: [UInt: TestCase]) { _ = testCases.map { (line, testCase) in let view = ProcessingView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let transformDelegateSpy = ProcessingViewDelegateShapeSpy( exception: expectation(description: testCase.description), view: view, shape: testCase.shape ) view.delegate = transformDelegateSpy waitForExpectations(timeout: 100) let actual = transformDelegateSpy.context?.path let expected = testCase.expect XCTAssertEqual(actual, expected, String(line)) } } private func radians(_ degrees: CGFloat) -> CGFloat { let radian = (CGFloat.pi * 2) * (degrees / 360.0) return radian } private func roundedRectPathBuilder(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat, topLeftRadius: CGFloat, topRightRadius: CGFloat, bottomLeftRadius: CGFloat, bottomRightRadius: CGFloat) -> CGPath? { let context = CGContext(data: nil, width: 100, height: 100, bitsPerComponent: 8, bytesPerRow: 1664, space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: 8194)! context.beginPath() context.move(to: CGPoint(x: x + topLeftRadius, y: y)) context.addLine(to: CGPoint(x: x + width - topRightRadius, y: y)) context.addArc(center: CGPoint(x: x + width - topRightRadius, y: y + topRightRadius), radius: topRightRadius, startAngle: radians(-90.0), endAngle: radians(0.0), clockwise: false) context.addLine(to: CGPoint(x: x + width, y: y + height - bottomRightRadius)) context.addArc(center: CGPoint(x: x + width - bottomRightRadius, y: y + height - bottomRightRadius), radius: bottomRightRadius, startAngle: radians(0.0), endAngle: radians(90.0), clockwise: false) context.addLine(to: CGPoint(x: x + bottomLeftRadius, y: y + height)) context.addArc(center: CGPoint(x: x + bottomLeftRadius, y: y + height - bottomLeftRadius), radius: bottomLeftRadius, startAngle: radians(90.0), endAngle: radians(180.0), clockwise: false) context.addLine(to: CGPoint(x: x, y: y + topLeftRadius)) context.addArc(center: CGPoint(x: x + topLeftRadius, y: y + topLeftRadius), radius: topLeftRadius, startAngle: radians(180.0), endAngle: radians(270.0), clockwise: false) context.closePath() return context.path } private func arcPathBuilder(x: CGFloat, y: CGFloat, radius: CGFloat, start: CGFloat, stop: CGFloat, clockwise: Bool) -> CGPath? { let context = CGContext(data: nil, width: 100, height: 100, bitsPerComponent: 8, bytesPerRow: 1664, space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: 8194)! context.addArc(center: CGPoint(x: x, y: y), radius: radius, startAngle: start, endAngle: stop, clockwise: clockwise) return context.path } private func curvePathBuilder(cpx1: CGFloat, cpy1: CGFloat, x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat, cpx2: CGFloat, cpy2: CGFloat) -> CGPath? { let context = CGContext(data: nil, width: 100, height: 100, bitsPerComponent: 8, bytesPerRow: 1664, space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: 8194)! let (b1, b2) = ShapeModel.convertCurvePoint(cpx1, cpy1, x1, y1, x2, y2, cpx2, cpy2) context.move(to: CGPoint(x: x1, y: y1)) context.addCurve(to: CGPoint(x: x2, y: y2), control1: CGPoint(x: b1.x, y: b1.y), control2: CGPoint(x: b2.x, y: b2.y)) return context.path } private func bezierPathBuilder(x1: CGFloat, y1: CGFloat, cpx1: CGFloat, cpy1: CGFloat, cpx2: CGFloat, cpy2: CGFloat, x2: CGFloat, y2: CGFloat) -> CGPath? { let context = CGContext(data: nil, width: 100, height: 100, bitsPerComponent: 8, bytesPerRow: 1664, space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: 8194)! context.move(to: CGPoint(x: x1, y: y1)) context.addCurve(to: CGPoint(x: x2, y: y2), control1: CGPoint(x: cpx1, y: cpy1), control2: CGPoint(x: cpx2, y: cpy2)) return context.path } } extension UIBezierPath { open func moveTo(_ point: CGPoint) -> UIBezierPath { self.move(to: point) return self } open func addLineTo(_ point: CGPoint) -> UIBezierPath { self.addLine(to: point) return self } open func addArcTo(_ center: CGPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool) -> UIBezierPath { self.addArc(withCenter: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: clockwise) return self } open func addCurveTo(_ points: (to: CGPoint, controlPoint1: CGPoint, controlPoint2: CGPoint)) -> UIBezierPath { self.addCurve(to: points.to, controlPoint1: points.controlPoint1, controlPoint2: points.controlPoint2) return self } open func closePath() -> UIBezierPath { self.close() return self } } ================================================ FILE: ProcessingKitTests/TransformTests.swift ================================================ // // TransformTests.swift // ProcessingKitTests // // Created by AtsuyaSato on 2018/01/14. // Copyright © 2018年 Atsuya Sato. All rights reserved. // import XCTest @testable import ProcessingKit /* Quartz 2D https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_affine/dq_affine.html | a b 0 | [x' y' 1] = [x y 1] × | c d 0 | | tx ty 1 | y ^ | | 0ーーーー> x */ enum Transform { case translate(x: CGFloat, y: CGFloat) case rotate(angle: CGFloat) case shear(angleX: CGFloat, angleY: CGFloat) case scale(x: CGFloat, y: CGFloat) } class ProcessingViewDelegateTransformSpy: ProcessingViewDelegate { private let exception: XCTestExpectation private let view: ProcessingView private let transform: Transform private(set) var context: CGContext? init(exception: XCTestExpectation, view: ProcessingView, transform: Transform) { self.exception = exception self.view = view self.transform = transform } func setup() { switch transform { case .translate(let x, let y): self.view.translate(x, y) case .rotate(let angle): self.view.rotate(angle) case .shear(let x, let y): self.view.shear(x, y) case .scale(let x, let y): self.view.scale(x, y) } self.record(UIGraphicsGetCurrentContext()) exception.fulfill() } private func record(_ arg: CGContext?) { self.context = arg } } class TransformTests: XCTestCase { let radians = { (angle: CGFloat) -> CGFloat in return .pi * angle / 360 } override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func testTranslate() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "Move 100pt to the right", transform: .translate(x: 100.0, y: 0.0), expect: CGAffineTransform(a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: 100.0, ty: 0.0) ), #line: TestCase( description: "Move 50pt to the bottom", transform: .translate(x: 0.0, y: 50.0), expect: CGAffineTransform(a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: -50.0) ), #line: TestCase( description: "Move 40pt to the left, 20pt to the top", transform: .translate(x: -40.0, y: -20.0), expect: CGAffineTransform(a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: -40.0, ty: 20.0) ), ] check(testCases: testCases) } func testRotate() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "Rotate by 90 degrees", transform: .rotate(angle: radians(90)), expect: CGAffineTransform(a: cos(radians(90)), b: -sin(radians(90)), c: sin(radians(90)), d: cos(radians(90)), tx: 0.0, ty: 0.0) ), #line: TestCase( description: "Rotate by 360 degrees", transform: .rotate(angle: radians(360)), expect: CGAffineTransform(a: cos(radians(360)), b: -sin(radians(360)), c: sin(radians(360)), d: cos(radians(360)), tx: 0.0, ty: 0.0) ), #line: TestCase( description: "Rotate by -90 degrees", transform: .rotate(angle: radians(-90)), expect: CGAffineTransform(a: cos(radians(-90)), b: -sin(radians(-90)), c: sin(radians(-90)), d: cos(radians(-90)), tx: 0.0, ty: 0.0) ), ] check(testCases: testCases) } func testShear() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "x-shear angle to 30°", transform: .shear(angleX: radians(30), angleY: radians(0)), expect: CGAffineTransform(a: 1.0, b: tan(radians(-0)), c: tan(radians(-30)), d: 1.0, tx: 0.0, ty: 0.0) ), #line: TestCase( description: "y-shear angle to 60°", transform: .shear(angleX: radians(0), angleY: radians(60)), expect: CGAffineTransform(a: 1.0, b: tan(radians(-60)), c: tan(radians(-0)), d: 1.0, tx: 0.0, ty: 0.0) ), #line: TestCase( description: "x-shear angle to 45° & y-shear angle to 45°", transform: .shear(angleX: radians(45), angleY: radians(45)), expect: CGAffineTransform(a: 1.0, b: tan(radians(-45)), c: tan(radians(-45)), d: 1.0, tx: 0.0, ty: 0.0) ), ] check(testCases: testCases) } func testScale() { let testCases: [UInt: TestCase] = [ #line: TestCase( description: "Scale width by 2.0 times", transform: .scale(x: 2.0, y: 1.0), expect: CGAffineTransform(a: 2.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: 0.0) ), #line: TestCase( description: "Scale width by 0.5 times, height by 2.0 times", transform: .scale(x: 0.5, y: 2.0), expect: CGAffineTransform(a: 0.5, b: 0.0, c: 0.0, d: 2.0, tx: 0.0, ty: 0.0) ), #line: TestCase( description: "Scale width by -2.0 times", transform: .scale(x: -2.0, y: 1.0), expect: CGAffineTransform(a: -2.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: 0.0) ), ] check(testCases: testCases) } func check(testCases: [UInt: TestCase]) { _ = testCases.map { (line, testCase) in let view = ProcessingView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let transformDelegateSpy = ProcessingViewDelegateTransformSpy( exception: expectation(description: testCase.description), view: view, transform: testCase.transform ) view.delegate = transformDelegateSpy waitForExpectations(timeout: 100) let actual = transformDelegateSpy.context?.ctm // Multiply scale(1.0, -1.0), translate(0.0, 100.0) and expect together for coordinate system let expected = CGAffineTransform(a: 1.0, b: 0.0, c: -0.0, d: -1.0, tx: 0.0, ty: 0.0).concatenating(testCase.expect.concatenating(CGAffineTransform(a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: 100.0))) XCTAssertEqual(actual, expected, String(line)) } } struct TestCase { let description: String let transform: Transform let expect: CGAffineTransform } } ================================================ FILE: README.md ================================================ ![Header](https://github.com/natmark/ProcessingKit/blob/master/Resources/ProcessingKit-Header.png?raw=true)

Build Status Pods Version Platforms Swift Carthage Compatible codecov

---------------- # ProcessingKit ProcessingKit is a Visual designing library for iOS & OSX. ProcessingKit written in Swift🐧 and you can write like [processing](https://github.com/processing/processing). ## Demo ![Demo](https://github.com/natmark/ProcessingKit/blob/master/Resources/demo.gif?raw=true) ### Demo Apps - [iOS Official Demo](https://github.com/natmark/ProcessingKit/tree/master/ProcessingKitExample) - [OSX Official Demo](https://github.com/natmark/ProcessingKit/tree/master/ProcessingKitOSXExample) #### [iPad Demo App (Developed for Open Source Conference)](https://github.com/natmark/OSCProcessingKitDemo) |Sketch Runner|Code Comparison (between Processing and ProcessingKit)| |:------------:|:----------------------------------------------------:| |![](https://raw.githubusercontent.com/natmark/OSCProcessingKitDemo/master/Resources/screenshot1.png)|![](https://raw.githubusercontent.com/natmark/OSCProcessingKitDemo/master/Resources/screenshot2.png)| ## Example |OS|gif|code| |:---:|:------:|:------:| |iOS| gif | ![code](https://raw.githubusercontent.com/natmark/ProcessingKit/master/Resources/iOS_ExampleCode.png)| |OSX| ![gif](https://raw.githubusercontent.com/natmark/ProcessingKit/master/Resources/OSX_Example.gif) | ![code](https://raw.githubusercontent.com/natmark/ProcessingKit/master/Resources/OSX_ExampleCode.png)| ## Requirements - Swift 3.0 or later - iOS 10.0 or later - OSX 10.11 or later If you use Swift 3.x, try [ProcessingKit 0.6.0](https://github.com/natmark/ProcessingKit/releases/tag/0.6.0). ## Usage 1. Create custom class that inherits from ProcessingView ```Swift import ProcessingKit class SampleView: ProcessingView { func setup() { // The setup() function is run once, when the view instantiated. } func draw() { // Called directly after setup(), the draw() function continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called. } } ``` 2. Create a SampleView instance ### Create programmatically ```Swift lazy var sampleView: SampleView = { let sampleView = SampleView(frame: frame) sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true) return sampleView }() ``` ### Use InterfaceBuilder 1. Add UIView to ViewController 2. Select UIView & Open Identity inspector 3. Set SampleView to Custom class field 4. Add outlet connection ```Swift @IBOutlet weak var sampleView: SampleView! override func viewDidLoad() { super.viewDidLoad() sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true) } ``` ## Installation ### [CocoaPods](http://cocoadocs.org/docsets/ProcessingKit/) Add the following to your `Podfile`: ``` pod "ProcessingKit" ``` - (Example project here: [PKPodsExample](https://github.com/natmark/PKPodsExample)) ### [Carthage](https://github.com/Carthage/Carthage) Add the following to your `Cartfile`: ``` github "natmark/ProcessingKit" ``` - (Example project here: [PKExample](https://github.com/natmark/PKExample)) ## Xcode File Template - `ProcessingKit.xctemplate` is available. - Use [Donut](https://github.com/natmark/Donut)(Xcode file template manager) to install. `$ donut install https://github.com/natmark/ProcessingKit` ## Documentation - [ProcessingKit/wiki](https://github.com/natmark/ProcessingKit/wiki) ## License ProcessingKit is available under the MIT license. See the LICENSE file for more info.