UIGraphicsBeginImageContext的应用

    xiaoxiao2021-12-14  21

    开启一个基于位图的图形上下文 /* size :大小 opaque : YES:不透明 NO:透明 scale: 缩放比例 */ void UIGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale) 从上下文中取得图片(UIImage) UIImage* UIGraphicsGetImageFromCurrentImageContext(); 结束基于位图的图形上下文 void UIGraphicsEndImageContext(); 图片裁剪 void CGContextClip(CGContextRef c) 将当前上下所绘制的路径裁剪出来(超出这个裁剪区域的都不能显示)
    转载请注明原文地址: https://ju.6miu.com/read-963022.html

    最新回复(0)