0417--iOS之UIGraphicsRendererFormat类

UIGraphicsRendererFormat是iOS图形渲染器上下文的配置类,用于设定渲染器的特性。它可以创建默认格式,获取关联上下文的范围,并提供适应设备配置的类方法。该类为抽象基类,用于创建图形渲染器,如用于Core Graphics图像或PDF的渲染器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Class

UIGraphicsRendererFormat         --基类

A set of drawing attributes that represent the configuration of a graphics renderer context.

          --一组配置图形渲染器上下文的绘制特征属性

 

Declaration

class UIGraphicsRendererFormat : NSObject

Overview            --概览

Create a UIGraphicsRendererFormat object, or one of its subclasses (UIGraphicsImageRendererFormat and UIGraphicsPDFRendererFormat), and use it to construct a graphics renderer by providing the format object as a parameter in a UIGraphicsRenderer subclass intializer.

           --创建一个UIGraphicsRendererFormat对象或其子类之一(UIGraphicsImageRendererFormatUIGraphicsPDFRendererFormat),并通过在UIGraphicsRenderer子类初始化器中以format对象作为构造器参数来构造图形渲染器

The graphics renderer uses the format object you provided to configure any context objects (UIGraphicsRendererContext) it creates as part of the rendering process.

       --图形渲染器使用您提供的format对象来配置渲染过程的部分或者全部的上下文对象(UIGraphicsRendererContext)。

If you use a graphics renderer initializer that does not require a format argument, the renderer creates a format object using the default() class method.

            --如果你使用的图形渲染器不需要format对象,则渲染器将使用default()类方法创建一个默认的format对象。

The renderer format object contains properties that represent the immutable aspects of the renderer's configuration. This means that repeated uses of a single graphics renderer object will always use the same format object.

          --renderer format对象包含了渲染器配置中的那些不可变的属性。这意味着重复使用某个图形渲染器对象会是始终使用相同的格式对象。

Topics                  --专题

Creating a Default Format                --创建默认的格式

class func `default`() -> Self

Returns a new format configured for the highest fidelity supported by the current device.

 

Getting the Bounds                  --获取范围

var bounds: CGRect

The bounds of the associated graphics context.

 

Type Methods                 --类方法

class func preferred() -> Self

Returns a new format best suited for the main screen’s current configuration.

 

Relationships               --继承关系

Inherits From

NSObject

Conforms To

See Also

Drawing Contexts

class UIGraphicsRenderer

An abstract base class for creating graphics renderers.

class UIGraphicsRendererContext

The base class for the drawing environments associated with graphics renderers.

class UIGraphicsImageRenderer

A graphics renderer for creating Core Graphics-backed images.

class UIGraphicsImageRendererContext

The drawing environment associated with an image renderer.

class UIGraphicsImageRendererFormat

A set of drawing attributes that represent the configuration of an image renderer context.

class UIGraphicsPDFRenderer

A graphics renderer for creating PDFs.

typealias UIGraphicsPDFRenderer.DrawingActions

A handler block that you use to draw PDF content.

class UIGraphicsPDFRendererContext

A drawing environment associated with a PDF renderer.

class UIGraphicsPDFRendererFormat

A set of drawing attributes that represents the configuration of a PDF renderer context.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值