UIGraphics 类

定义

用于在屏幕上绘制的帮助程序方法、PDF 上下文或位图。

public static class UIGraphics
type UIGraphics = class
继承
UIGraphics

注解

此类中的方法通常对应于 UIGraphics* Apple UIKit Framework 中的 和 UIRect* 方法。

属性

PDFContextBounds

返回 PDF 页面的当前边界。

方法

AddPDFContextDestination(String, CGPoint)

在给定位置添加具有给定名称的 PDF 目标。

BeginImageContext(CGSize)

推送新的图像上下文,使其成为当前图形上下文。

BeginImageContextWithOptions(CGSize, Boolean, nfloat)

推送新的图像上下文,使其成为当前图形上下文。

BeginPDFContext(NSMutableData, CGRect, NSDictionary)

推送新的 PDF 呈现上下文,使其成为当前图形上下文。

BeginPDFContext(String, CGRect, CGPDFInfo)

推送新的 PDF 呈现上下文,使其成为当前图形上下文。

BeginPDFContext(String, CGRect, NSDictionary)

推送新的 PDF 呈现上下文,使其成为当前图形上下文。

BeginPDFPage()

使用初始 PDF 上下文中的边界启动新页面。

BeginPDFPage(CGRect, NSDictionary)

使用初始 PDF 上下文中的边界启动新页面。

EndImageContext()

弹出当前图像上下文。

EndPDFContent()

关闭 PDF 上下文并从堆栈弹出它。

GetCurrentContext()

返回当前图形上下文

GetImageFromCurrentImageContext()

以图像形式返回当前上下文的内容。

PopContext()

弹出顶部上下文,并将上一个上下文设置为默认上下文。

PushContext(CGContext)

手动将 CGContext 推送到 UIKit 图形上下文堆栈中。

RectClip(CGRect)

将当前剪辑路径与指定的矩形相交。

RectFill(CGRect)

使用当前上下文中的当前颜色填充矩形。

RectFillUsingBlendMode(CGRect, CGBlendMode)

使用 当前填充颜色填充 。

RectFrame(CGRect)

在指定的矩形内绘制一个框架。

RectFrameUsingBlendMode(CGRect, CGBlendMode)

在指定的矩形内绘制一个框架,并将其与 混合。

SetPDFContextDestination(String, CGRect)

在给定位置设置具有给定名称的 PDF 目标。

SetPDFContextURL(NSUrl, CGRect)

将 URL 链接到 PDF 页面上的指定矩形。

适用于