This repository was archived by the owner on Aug 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
JSQMessagesViewController/Factories Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,13 @@ + (UIImage *)jsq_imageWitInitials:(NSString *)initials
130130 UIGraphicsBeginImageContextWithOptions (frame.size , NO , [UIScreen mainScreen ].scale );
131131 {
132132 CGContextRef context = UIGraphicsGetCurrentContext ();
133- CGContextSaveGState (context);
134133
135134 CGContextSetFillColorWithColor (context, backgroundColor.CGColor );
136135 CGContextFillRect (context, frame);
137136 [initials drawAtPoint: drawPoint withAttributes: attributes];
138137
139138 image = UIGraphicsGetImageFromCurrentImageContext ();
140139
141- CGContextRestoreGState (context);
142140 }
143141 UIGraphicsEndImageContext ();
144142
@@ -156,7 +154,6 @@ + (UIImage *)jsq_circularImage:(UIImage *)image withDiameter:(NSUInteger)diamete
156154 UIGraphicsBeginImageContextWithOptions (frame.size , NO , [UIScreen mainScreen ].scale );
157155 {
158156 CGContextRef context = UIGraphicsGetCurrentContext ();
159- CGContextSaveGState (context);
160157
161158 UIBezierPath *imgPath = [UIBezierPath bezierPathWithOvalInRect: frame];
162159 [imgPath addClip ];
@@ -168,8 +165,7 @@ + (UIImage *)jsq_circularImage:(UIImage *)image withDiameter:(NSUInteger)diamete
168165 }
169166
170167 newImage = UIGraphicsGetImageFromCurrentImageContext ();
171-
172- CGContextRestoreGState (context);
168+
173169 }
174170 UIGraphicsEndImageContext ();
175171
You can’t perform that action at this time.
0 commit comments