SDGraphicsImageRendererFormat

@interface SDGraphicsImageRendererFormat : NSObject

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

  • The display scale of the image renderer context. The default value is equal to the scale of the main screen.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat scale;

    Swift

    var scale: CGFloat { get set }
  • A Boolean value indicating whether the underlying Core Graphics context has an alpha channel. The default value is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL opaque;

    Swift

    var opaque: Bool { get set }
  • Specifying whether the bitmap context should use extended color. For iOS 12+, the value is from system preferredRange property For iOS 10-11, the value is from system prefersExtendedRange property For iOS 9-, the value is .standard

    Declaration

    Objective-C

    @property (nonatomic) SDGraphicsImageRendererFormatRange preferredRange;

    Swift

    var preferredRange: SDGraphicsImageRendererFormatRange { get set }
  • Init the default format. See each properties’s default value.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Returns a new format best suited for the main screen’s current configuration.

    Declaration

    Objective-C

    + (nonnull instancetype)preferredFormat;

    Swift

    class func preferred() -> Self