Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kawoou committed May 3, 2017
1 parent af19b7f commit 579eb72
Show file tree
Hide file tree
Showing 12 changed files with 2,820 additions and 0 deletions.
45 changes: 45 additions & 0 deletions FlexibleImage.playground/Contents.swift
@@ -0,0 +1,45 @@
import UIKit

let image1 = UIImage
.circle(
color: UIColor.blue,
size: CGSize(width: 100, height: 100)
)?
.adjust()
.offset(CGPoint(x: 25, y: 0))
.margin(UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5))
.padding(UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15))
.normal(color: UIColor.white)
.border(color: UIColor.red, lineWidth: 5, radius: 50)
.image()?
.adjust()
.background(color: UIColor.darkGray)
.image()

let image2 = UIImage(named: "macaron.jpg")

let image3 = image2?.adjust()
.outputSize(CGSize(width: 250, height: 250))
.exclusion(color: UIColor(red: 0, green: 0, blue: 0.352941176, alpha: 1.0))
.linearDodge(color: UIColor(red: 0.125490196, green: 0.058823529, blue: 0.192156863, alpha: 1.0))
.image()

let image4 = image3?.adjust()
.hardMix(color: UIColor(red: 0.3, green: 0.3, blue: 0.3, alpha: 1.0))
.image()

let image5 = image4?.adjust()
.append(
image1!.adjust()
.outputSize(CGSize(width: 250, height: 250))
.alpha(0.5)
)
.image()

let image6 = image4 + image1






Binary file added FlexibleImage.playground/Resources/macaron.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 579eb72

Please sign in to comment.