BrushEditController

@objcMembers
@objc(PESDKBrushEditController)
open class BrushEditController : ViewController
extension BrushEditController: SliderEditControllerDelegate
extension BrushEditController: PhotoPreviewControlling
extension BrushEditController: PhotoEditModelSettable
extension BrushEditController: VideoPreviewControlling

A BrushEditController contains a SliderEditController and can be used to draw in a CanvasView.

Properties

  • The slider edit controller that belongs to this tool controller.

    Declaration

    Swift

    public let sliderEditController: SliderEditController<TooltipSlider>
  • 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 var sliderChangedValueClosure: ((Slider, BrushTool) -> Void)?
  • The object that acts as a delegate.

    Declaration

    Swift

    open weak var delegate: BrushEditControllerDelegate
  • The photo edit model that belongs to this controller.

    Declaration

    Swift

    open var photoEditModel: PhotoEditModel { get set }
  • The brush preview view that previews the brush when changing any properties of it.

    Declaration

    Swift

    open private(set) lazy var brushPreviewView: BrushPreviewView { get set }
  • The currently active brush tool.

    Declaration

    Swift

    open var activeBrushTool: BrushTool? { get set }
  • The color of the brush.

    Declaration

    Swift

    open var color: UIColor { get set }
  • The size of the brush.

    Declaration

    Swift

    open var size: CGFloat { get set }
  • The hardness of the brush.

    Declaration

    Swift

    open var hardness: CGFloat { get set }

Initializers

  • Creates a new BrushEditController with the given SliderEditController.

    Declaration

    Swift

    public init(sliderEditController: SliderEditController<TooltipSlider>)

    Parameters

    sliderEditController

    The slider edit controller to contain in this edit controller.

  • This is a boxed property which exposes a Swift struct to Objective-C. This property should only be used if you are using Objective-C.

    Every invocation of the getter will return a new (temporary) object wrapping the underlying Swift struct. Boxed properties cannot be chained with the dot syntax for mutable access of nested properties in place. Use the setter with the assignment operator instead to modify boxed properties, e.g.:

    PESDKPhotoEditModel *photoEditModel = [[PESDKPhotoEditModel alloc] init];
    
    // CORRECT:
    // get boxed `AdjustmentModel`
    PESDKAdjustmentModel *adjustmentModel = photoEditModel.adjustmentModel;
    // modify boxed `AdjustmentModel`
    adjustmentModel.brightness = 0.5;
    // set modified boxed `AdjustmentModel`
    photoEditModel.adjustmentModel = adjustmentModel;
    
    // WRONG:
    photoEditModel.adjustmentModel.brightness = 0.5;
    

    Declaration

    Swift

    var boxedPhotoEditModel: _ObjCPhotoEditModel { get set }