C++11多线程编程之互斥量

+(UIImage*)createImageFromView:(UIView*)view

{

//obtain scale

    CGFloat scale = [UIScreen mainScreen].scale;

开始绘图,下面方法,第一个参数表示区域大小。第二个参数表示是否是非透明的。如果需要显示半透明效果,需要传NO,否则传YES。第三个参数就是屏幕密度了

    UIGraphicsBeginImageContextWithOptions(CGSizeMake(view.frame.size.width,
                                                      view.frame.size.height),
                                           NO,
                                           scale);
   将view上的子view加进来
    [view.layer renderInContext:context];
    CGContextRestoreGState(context);
    //开始生成图片
    UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

C++11多线程编程之互斥量,布布扣,bubuko.com

C++11多线程编程之互斥量

上一篇:浅析java(多方面解读)


下一篇:java.lang.Integer can not be cast to java.lang.Long