QuadDrawingItem
QuadDrawingItem
is a subclass of DrawingItem
. Dynamsoft Camera Enhancer will draw the QuadDrawingItem
on the UI if it is created and added to the DCECameraView
or DCEImageEditorView
.
- Objective-C
- Swift
@interface QuadDrawingItem (DrawingItem)
class QuadDrawingItem : DrawingItem
Method Name | Description |
---|---|
initWithQuad |
The constructor of QuadDrawingItem . Initialize the instance of QuadDrawingItem . |
quad |
The Quadrilateral property that indicates the position of the QuadDrawingItem . |
drawingStyleId |
Get the drawing style of the current DrawingItem . |
state |
Set the state of the current DrawingItem . |
getMediaType |
Get the media type of the current DrawingItem . |
initWithQuad
The constructor of QuadDrawingItem
. Initialize the instance of QuadDrawingItem
.
- Objective-C
- Swift
- (instancetype) initWithQuad:(Quadrilateral*)quad;
init(quad: iQuadrilateral)
Parameters
quad
: A Quadrilateral
that includes the position of the QuadDrawingItem
.
Code Snippet
- Objective-C
- Swift
DrawingItem* drawingItem = [[QuadDrawingItem alloc] initWithQuad:quad];
let drawingItem = QuadDrawingItem.init(quad:quad)
quad
The Quadrilateral
property that indicates the position of the QuadDrawingItem
.
- Objective-C
- Swift
@property (assign, nonatomic, readonly) Quadrilateral* quad;
var quad: iQuadrilateral { get }
drawingStyleId
The property that identifies the ID of the DrawingStyle
.
- Objective-C
- Swift
@property (assign, nonatomic) NSInteger drawingStyleId;
var drawingStyleId: Int { get set }
state
The property that indicates the state of the DrawingItem
. View all available DrawingItem
states in EnumDrawingItemState
.
- Objective-C
- Swift
@property (assign, nonatomic) EnumDrawingItemState state;
var state: EnumDrawingItemState { get set }
getMediaType
Get the media type of the DrawingItem
.
- Objective-C
- Swift
- (EnumDrawingItemMediaType) getMediaType;
func getMediaType() -> EnumDrawingItemMediaType
Return Value
The media type of the DrawingItem
.
Code Snippet
- Objective-C
- Swift
EnumDrawingItemMediaType mediaType = [drawingItem getMediaType];
let mediaType = drawingItem.getMediaType()