DSQuadDrawingItem
The DSQuadDrawingItem
class is a subclass of DSDrawingItem
. It represents a drawing item that draws quadrilaterals on the view.
Definition
Assembly: DynamsoftCameraEnhancer.xcframework
- Objective-C
- Swift
@interface DSQuadDrawingItem : DSDrawingItem
class QuadDrawingItem : DrawingItem
Attributes
Attributes | Type | Description |
---|---|---|
quad |
DSQuadrilateral * | Get the quadrilateral information of the DSQuadDrawingItem . |
Methods
Method | Description |
---|---|
initWithQuad |
Create an instance of DSQuadDrawingItem . |
Interited Attributes
The following attributes are inherited from the base class DrawingItem
.
Attributes | Type | Description |
---|---|---|
drawingStyleId |
NSInteger | The DrawingStyle of the DrawingItem. If a DrawingItem holds a drawingStyleId, it will not use the default style of its layer. |
state |
DSDrawingItemState | The state of the DrawingItem. |
CoordinateBase |
DSCoordinateBase | The coordinate base of the DrawingItem. The coordinate base is image by default. |
Interited Methods
The following methods are inherited from the base class DrawingItem
.
Method | Description |
---|---|
getMediaType |
Get the media type of the DrawingItem. |
addNote |
Add a note to the DrawingItem. |
getNote |
Get the specified DSNote. |
hasNote |
Check whether the specified Note exists. |
updateNote |
Update the content of the specified DSNote. |
deleteNote |
Remove the specified DSNote with the specified name. |
getAllNotes |
Get all DSNotes of this DrawingItem. |
clearNotes |
Remove all DSNotes of this DrawingItem. |
quad
The property that stores the coordinate information of the DSQuadDrawingItem
in a DSQuadrilateral
object.
- Objective-C
- Swift
@property(strong, nonatomic, readonly) DSQuadrilateral *quad;
var quad: DSQuadrilateral { get }
initWithQuad
Create an instance of DSQuadDrawingItem
.
- Objective-C
- Swift
- (instancetype)initWithQuad:(DSQuadrilateral *)quad;
init(quad: DSQuadrilateral)
Parameters
quad
: A DSQuadrilateral
object that stores the quadrilateral coordinates information.
Return Value
An instance of DSQuadDrawingItem
.
Code Snippet
- Objective-C
- Swift
DSQuadDrawingItem *item = [[DSQuadDrawingItem alloc] initWithQuad:quad];
let item = QuadDrawingItem(quad: quad)
initWithQuad:coordinateBase
Create an instance of DSQuadDrawingItem
.
- Objective-C
- Swift
- (instancetype)initWithQuad:(DSQuadrilateral *)quad coordinateBase:(DSCoordinateBase)coordinateBase;
init(quad: DSQuadrilateral, coordinateBase: DSCoordinateBase)
Parameters
quad
: A DSQuadrilateral
object that stores the quadrilateral coordinates information.
coordinateBase
: The coordinate base of the DrawingItem
.
Return Value
An instance of DSQuadDrawingItem
.
Code Snippet
- Objective-C
- Swift
DSQuadDrawingItem *item = [[DSQuadDrawingItem alloc] initWithQuad:quad coordinateBase:base];
let item = QuadDrawingItem(quad: quad, coordinateBase: base)