Thanks for downloading Dynamsoft Label Recognizer Package!
Your download will start shortly. If your download does not begin, click here to retry.
RectDrawingItem
RectDrawingItem
is a subclass of DrawingItem
. Dynamsoft Camera Enhancer will draw the RectDrawingItem
on the UI if it is created and added to the DCECameraView
or DCEImageEditorView
.
@interface RectDrawingItem (DrawingItem)
Method Name | Description |
---|---|
initWithRect |
The constructor of RectDrawingItem . Initialize the instance of RectDrawingItem . |
rect |
The property that indicates the Rect of the RectDrawingItem . |
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 . |
initWithRect
The constructor of RectDrawingItem
. Initialize the instance of RectDrawingItem
.
- (instancetype) initWithRect:(CGRect)rect;
Parameters
rect
: A Rect
that indicates the location of the RectDrawingItem
.
Code Snippet
- Objective-C
- Swift
DrawingItem* drawingItem = [[RectDrawingItem alloc] initWithRect:rect];
let drawingItem = RectDrawingItem.init(rect:rect)
rect
The property that indicates the Rect
of the RectDrawingItem
.
@property (assign, nonatomic, readonly) CGRect rect;
drawingStyleId
The property that identifies the ID of the DrawingStyle
.
@property (assign, nonatomic) NSInteger drawingStyleId;
state
The property that indicates the state of the DrawingItem
. View all available DrawingItem
states in EnumDrawingItemState
.
@property (assign, nonatomic) EnumDrawingItemState state;
getMediaType
Get the media type of the DrawingItem
.
- (EnumDrawingItemMediaType) getMediaType;
Return Value
The media type of the DrawingItem
.
Code Snippet
- Objective-C
- Swift
EnumDrawingItemMediaType mediaType = [drawingItem getMediaType];
let mediaType = drawingItem.getMediaType()