project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 3910 dd47efbdec46
parent 3903 db01c37494af
child 3948 24daa33a3114
equal deleted inserted replaced
3908:1429c303858d 3910:dd47efbdec46
   218     UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
   218     UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
   219     UIGraphicsEndImageContext();
   219     UIGraphicsEndImageContext();
   220     return result;
   220     return result;
   221 }
   221 }
   222 
   222 
       
   223 +(UIImage *)whiteImage:(CGSize) ofSize {
       
   224     // white rounded rectangle as background image for previewButton
       
   225     UIGraphicsBeginImageContext(ofSize);
       
   226     CGContextRef context = UIGraphicsGetCurrentContext();
       
   227     UIGraphicsPushContext(context);
       
   228 
       
   229     CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
       
   230     CGContextFillRect(context,CGRectMake(0,0,ofSize.width,ofSize.height));
       
   231 
       
   232     UIGraphicsPopContext();
       
   233     UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext();
       
   234     UIGraphicsEndImageContext();
       
   235     return bkgImg;
       
   236 }
       
   237 
   223 @end
   238 @end