BrushToolControllerOptions

@objc(PESDKBrushToolControllerOptions) open class BrushToolControllerOptions: ToolControllerOptions

Options for configuring an BrushToolController.

  • Defines all allowed tools. The brush tool buttons are shown in the given order. Defaults to show all available tools. To set this property from Obj-C, see the allowedBrushToolsAsNSNumbers property.

    Declaration

    Swift

    open let allowedBrushTools: [BrushTool]
  • This closure allows further configuration of the brush tool buttons. The closure is called for each brush tool button and has the button and its corresponding brush tool as parameters.

    Declaration

    Swift

    open let brushToolButtonConfigurationClosure: ((UICollectionViewCell, BrushTool) -> Void)?
  • This closure is called every time the user selects a tool.

    Declaration

    Swift

    open let brushToolSelectedClosure: ((BrushTool) -> Void)?
  • This closure can be used to configure the slider that is visible when selecting a brush tool.

    Declaration

    Swift

    open let sliderConfigurationClosure: ((Slider) -> Void)?
  • This closure can be used to configure the view that contains the slider and that is visible when selecting a brush tool.

    Declaration

    Swift

    open let sliderContainerConfigurationClosure: ViewConfigurationClosure?
  • This closure will be called whenever the value of the slider changes. The Slider and the active BrushTool will be passed as parameters.

    Declaration

    Swift

    open let sliderChangedValueClosure: ((Slider, BrushTool) -> Void)?
  • This closure allows further configuration of the overlay buttons. The closure is called for each button and has the button and its corresponding enum value as parameters.

    Declaration

    Swift

    open let overlayButtonConfigurationClosure: ((OverlayButton, BrushOverlayAction) -> Void)?
  • Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions. To set this property from Obj-C, see the allowedBrushOverlayActionsAsNSNumbers property.

    Declaration

    Swift

    open let allowedBrushOverlayActions: [BrushOverlayAction]
  • This closure is called when the user selects an action.

    Declaration

    Swift

    open let brushActionSelectedClosure: ((BrushOverlayAction) -> Void)?
  • The minimum size that a brush can have in pixels.

    Declaration

    Swift

    open let minimumBrushSize: CGFloat
  • The maximum size that a brush can have in pixels.

    Declaration

    Swift

    open let maximumBrushSize: CGFloat
  • The default size that a brush has in pixels

    Declaration

    Swift

    open let defaultBrushSize: CGFloat
  • The minimum hardness factor a brush can have.

    Declaration

    Swift

    open let minimumBrushHardness: CGFloat
  • The maximum hardness factor a brush can have.

    Declaration

    Swift

    open let maximumBrushHardness: CGFloat
  • The default hardness factor a brush has.

    Declaration

    Swift

    open let defaultBrushHardness: CGFloat
  • The default color a brush has.

    Declaration

    Swift

    open let defaultBrushColor: UIColor
  • false if the opacity of the brush should vary by the size of the brush, true otherwise. Default is false.

    Declaration

    Swift

    open let usesUniformHardness: Bool
  • Returns a newly allocated instance of BrushToolControllerOptions using the default builder.

    Declaration

    Swift

    public convenience init()

    Return Value

    An instance of BrushToolControllerOptions.

  • Returns a newly allocated instance of BrushToolControllerOptions using the given builder.

    Declaration

    Swift

    public init(builder: BrushToolControllerOptionsBuilder)

    Parameters

    builder

    A BrushToolControllerOptionsBuilder instance.

    Return Value

    An instance of BrushToolControllerOptions.