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 NSColor *)color;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    /*not inherited*/ init(color: NSColor?, fill fillColor: NSColor?, 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) NSColor *color;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var colorWithAlpha: NSColor? { 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) NSColor *fillColor;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat alpha;

    Swift

    var alpha: CGFloat { get }