CanvasViewDataSource
@available(iOS 9.0, *)
@objc(PESDKCanvasViewDataSource)
public protocol CanvasViewDataSource
The CanvasViewDataSource
protocol defines methods that allow you to pass needed information to the canvas view.
-
Called to ask for the normalized crop rect that is currently applied to the image.
Declaration
Swift
func canvasViewNormalizedCropRect(_ canvasView: CanvasView) -> CGRect
Parameters
canvasView
The canvas view that is requesting this information.
Return Value
The normalized crop rect.
-
Called to ask for the image orientation that is currently applied to the image.
Declaration
Swift
func canvasViewAppliedOrientation(_ canvasView: CanvasView) -> Orientation
Parameters
canvasView
The canvas view that is requesting this information.
Return Value
The applied image orienation.
-
Called to ask for the straighten angle that is currently applied to the image.
Declaration
Swift
func canvasViewStraightenAngle(_ canvasView: CanvasView) -> CGFloat
Parameters
canvasView
The canvas view that is requesting this information.
Return Value
The applied straighten angle.
-
Called to ask for the image insets that are currently applied to the image.
Declaration
Swift
func canvasViewImageInsets(_ canvasView: CanvasView) -> UIEdgeInsets
Parameters
canvasView
The canvas view that is requesting this information.
Return Value
The applied image insets.
-
Called to ask for the size of the output image.
Declaration
Swift
func canvasViewOutputImageSize(_ canvasView: CanvasView) -> CGSize
Parameters
canvasView
The canvas view that is requesting this information.
Return Value
The output image size.