Thanks for downloading Dynamsoft Label Recognizer Package!
Your download will start shortly. If your download does not begin, click here to retry.
TextDrawingItem
TextDrawingItem
is a subclass of DrawingItem
. Dynamsoft Camera Enhancer will draw the TextDrawingItem
on the UI if it is created and added to the DCECameraView
or DCEImageEditorView
.
@interface TextDrawingItem (DrawingItem)
Method Name | Description |
---|---|
initWithText |
The constructor of TextDrawingItem . Initialize the instance of TextDrawingItem . |
text |
The property that indicates the text of the TextDrawingItem . |
textRect |
The CGRect property that indicates the location of the TextDrawingItem . |
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 . |
initWithText
The constructor of TextDrawingItem
. Initialize the instance of TextDrawingItem
.
- (instancetype) initWithText:(NSString*)text textRect(CGRect)textRect;
Parameters
text
: The text of the TextDrawingItem
.
textRect
: The CGRect
that indicates the location of the TextDrawingItem
.
Code Snippet
- Objective-C
- Swift
DrawingItem* drawingItem = [[TextDrawingItem alloc] initWithText:@"" rect:rect];
let drawingItem = TextDrawingItem.init(text:"Your-Text", rect:rect)
text
The property that indicates the text of the TextDrawingItem
.
@property (assign, nonatomic, readonly) NSString* text;
textRect
The CGRect
property that indicates the location of the TextDrawingItem
.
@property (assign, nonatomic, readonly) CGRect textRect;
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()