@@ -11,6 +11,7 @@ Features
1111--------
1212
1313* [x] [ Create images with method chaining] ( #getting-started )
14+ * [x] [ Gradient fill and stroke] ( #methods-available )
1415* [x] [ Create and manipulate images with CGContext] ( #play-with-cgcontext )
1516* [x] [ Combine images with ` + ` operator] ( #image-operator )
1617* [x] iOS support
@@ -76,7 +77,7 @@ You can set fill color, border attributes, corner radius, etc.
7677``` swift
7778UIImage.size (width : 100 , height : 100 ) // fixed size
7879 .color (.white ) // fill color
79- .border (color : .red )) // border color
80+ .border (color : .red ) // border color
8081 .border (width : 10 ) // border width
8182 .corner (radius : 20 ) // corner radius
8283```
@@ -106,28 +107,77 @@ imageView.image = UIImage.size(width: 100, height: 100)
106107
107108### Methods Available
108109
109- | Start Chaining Method | Description |
110- | ---| ---|
111- | ` .size(width: CGFloat, height: CGFloat) ` | Start chaining for fixed size image |
112- | ` .size(CGSize) ` | Start chaining for fixed size image |
113- | ` .resizable() ` | Start chaining for resizable image |
114-
115- | Setting Property Method | Description |
116- | ---| ---|
117- | ` .color(UIColor) ` | Set fill color |
118- | ` .border(width: CGFloat) ` | Set border width |
119- | ` .border(color: UIColor) ` | Set border color |
120- | ` .border(alignment: BorderAlignment) ` | Set border alignment. Same with Photoshop's.<br > ` .inside ` , ` .center ` , ` .outside ` |
121- | ` .corner(radius: CGFloat) ` | Set all corners radius of image |
122- | ` .corner(topLeft: CGFloat) ` | Set top left corner radius of image |
123- | ` .corner(topRight: CGFloat) ` | Set top right corner radius of image |
124- | ` .corner(bottomLeft: CGFloat) ` | Set bottom left corner radius of image |
125- | ` .corner(bottomRight: CGFloat) ` | Set bottom right corner radius of image |
126-
127-
128- | Generating Image Method | Description |
129- | ---| ---|
130- | ` .image ` | Generate and return image |
110+ #### Starting Method Chaining
111+
112+ * ** ` .size(width: CGFloat, height: CGFloat) ` **
113+
114+ Starts chaining for fixed size image
115+
116+ * ** ` .size(CGSize) ` **
117+
118+ Starts chaining for fixed size image
119+
120+ * ** ` .resizable() ` **
121+
122+ Starts chaining for resizable image
123+
124+ #### Setting Properties
125+
126+ * ** ` .color(UIColor) ` **
127+
128+ Sets fill color
129+
130+ * ** ` .color(gradient: [UIColor], locations: [CGFloat], from: CGPoint, to: CGPoint) ` **
131+
132+ Sets gradient fill color
133+
134+ * New in version 1.1.0*
135+
136+ * ** ` .border(width: CGFloat) ` **
137+
138+ Sets border width
139+
140+ * ** ` .border(color: UIColor) ` **
141+
142+ Sets border color
143+
144+ * ** ` .border(gradient: [UIColor], locations: [CGFloat], from: CGPoint, to: CGPoint) ` **
145+
146+ Sets gradient border color
147+
148+ * New in version 1.1.0*
149+
150+ * ** ` .border(alignment: BorderAlignment) ` **
151+
152+ Sets border alignment. Same with Photoshop's
153+
154+ available values: ` .inside ` , ` .center ` , ` .outside `
155+
156+ * ** ` .corner(radius: CGFloat) ` **
157+
158+ Sets all corners radius of image
159+
160+ * ** ` .corner(topLeft: CGFloat) ` **
161+
162+ Sets top left corner radius of image
163+
164+ * ** ` .corner(topRight: CGFloat) ` **
165+
166+ Sets top right corner radius of image
167+
168+ * ** ` .corner(bottomLeft: CGFloat) ` **
169+
170+ Sets bottom left corner radius of image
171+
172+ * ** ` .corner(bottomRight: CGFloat) ` **
173+
174+ Sets bottom right corner radius of image
175+
176+ #### Generating Image
177+
178+ * ** ` .image ` **
179+
180+ Generates and returns image
131181
132182
133183Play with CGContext
0 commit comments