当前位置:   article > 正文

0428--iOS之UIGraphicsBeginImageContextWithOptions(_:_:_:)绘图全局方法_ios uigraphicsbeginimagecontextwithoptions

ios uigraphicsbeginimagecontextwithoptions

Function

UIGraphicsBeginImageContextWithOptions(_:_:_:)

Creates a bitmap-based graphics context with the specified options.

     该方法使用指定的选项创建基于位图的图形上下文,并压栈(UIKit维护的上下文栈)

 

Declaration       --声明

  1. func UIGraphicsBeginImageContextWithOptions(_ size: CGSize,
  2. _ opaque: Bool,
  3. _ scale: CGFloat)

Parameters       --参数

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/93380
推荐阅读
相关标签
  

闽ICP备14008679号