赞
踩
Function
Creates a bitmap-based graphics context with the specified options.
该方法使用指定的选项创建基于位图的图形上下文,并压栈(UIKit维护的上下文栈)
- func UIGraphicsBeginImageContextWithOptions(_ size: CGSize,
- _ opaque: Bool,
- _ scale: CGFloat)
size
The size (measured in points) of the new bitmap context. This represents the size of the image returned by the UIGraphicsGetImageFromCurrentImageContext()
function. To get the size of the bitmap in pixels, you must multiply the width and height values by the value in the scale
parameter.
--新位图上下文的尺寸(以点为单位),也就是UIGraphicsGetImageFromCurrentImageContext()函数返回的图像大小。要获取位图的像素大小,必须将宽度和高度值乘以scale参数中的值。
opaque
A Boolean flag indicating whether the bitmap is opaque. If you know the bitmap is fully opaque, specify true
to ignore the alpha channel and optimize the bitma
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。