Prechádzať zdrojové kódy

Expose init for filter

onevcat 9 rokov pred
rodič
commit
515a08ef91
2 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 4 0
      Sources/Filter.swift
  2. 1 1
      Sources/ImageSerializer.swift

+ 4 - 0
Sources/Filter.swift

@@ -56,6 +56,10 @@ public struct Filter {
     
     
     let transform: Transformer
     let transform: Transformer
 
 
+    public init(tranform: Transformer) {
+        self.transform = tranform
+    }
+    
     /// Tint filter which will apply a tint color to images.
     /// Tint filter which will apply a tint color to images.
     public static var tint: (Color) -> Filter = {
     public static var tint: (Color) -> Filter = {
         color in
         color in

+ 1 - 1
Sources/ImageSerializer.swift

@@ -27,7 +27,7 @@
 import Foundation
 import Foundation
 
 
 /// An `CacheSerializer` would be used to convert some data to an image object for 
 /// An `CacheSerializer` would be used to convert some data to an image object for 
-/// retrieving from disk cache or vice versa for storing to disk cache.
+/// retrieving from disk cache and vice versa for storing to disk cache.
 public protocol CacheSerializer {
 public protocol CacheSerializer {
     
     
     /// Get the serialized data from a provided image
     /// Get the serialized data from a provided image