PSPDFColorPreset

Objective-C


@interface PSPDFColorPreset : PSPDFModel <PSPDFStylePreset>

Swift

class ColorPreset : ModelObject, PSPDFStylePreset

Model class used to define custom color presets.

See

PSPDFStyleManager
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Creates a new preset with a nil fillColor and alpha set to 1..

    Declaration

    Objective-C

    + (nonnull PSPDFColorPreset *)presetWithColor:(nullable UIColor *)color;

    Swift

    /*not inherited*/ init(color: UIColor?)
  • Creates a new custom preset.

    Declaration

    Objective-C

    + (nonnull PSPDFColorPreset *)presetWithColor:(nullable UIColor *)color
                                        fillColor:(nullable UIColor *)fillColor
                                            alpha:(CGFloat)alpha;

    Swift

    /*not inherited*/ init(color: UIColor?, fill fillColor: UIColor?, alpha: CGFloat)
  • The primary preset color (the content color).

    Note

    The color will be standardized to the RGB color space with an alpha value of 1.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIColor *color;

    Swift

    var color: UIColor? { get }
  • The color with added alpha.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIColor *colorWithAlpha;

    Swift

    var colorWithAlpha: UIColor? { get }
  • The secondary preset color (fill color).

    Note

    The color will be standardized to the RGB color space with an alpha value of 1.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIColor *fillColor;

    Swift

    var fillColor: UIColor? { get }
  • The fillColor with added alpha.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIColor *fillColorWithAlpha;

    Swift

    var fillColorWithAlpha: UIColor? { get }
  • The preset alpha.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat alpha;

    Swift

    var alpha: CGFloat { get }