DSDecodedBarcodeElement Class
The DSDecodedBarcodeElement
class represents a decoded barcode element. It inherits from the DSRegionObjectElement
class and provides additional functionality for retrieving information about the decoded barcode.
Definition
Assembly: DynamsoftBarcodeReader.framework
- Objective-C
- Swift
@interface DSDecodedBarcodeElement: DSRegionObjectElement
class DecodedBarcodeElement: RegionObjectElement
Methods
Methods | Description |
---|---|
init |
Initialize a new DSDecodedBarcodeElement object. |
getText |
Get the text of the decoded barcode. |
setText |
Set the text of the decoded barcode. |
getBytes |
Get the bytes of the decoded barcode. |
setBytes |
Set the bytes of the decoded barcode. |
getFormat |
Get the format of the decoded barcode. |
setFormat |
Set the format of the decoded barcode. |
getConfidence |
Get the confidence of the decoded barcode. |
setConfidence |
Set the confidence of the decoded barcode. |
getFormatString |
Get the format string of the decoded barcode. |
getAngle |
Get the angle of the decoded barcode. |
getModuleSize |
Get the module size of the decoded barcode. |
getDetails |
Get the details of the decoded barcode. |
getExtendedBarcodeResults |
Get the extended barcode results of the decoded barcode. |
isDPM |
Check if the decoded barcode is DPM. |
isMirrored |
Check if the decoded barcode is mirrored. |
Inherited Attributes
The following attributes are inherited from class DSRegionObjectElement
.
Method | Description |
---|---|
getLocation |
Returns the location info of the element. |
setLocation |
Sets the location info of the element. |
getReferencedElement |
Returns the referenced element that supports the capturing of this element. |
getRegionObjectElementType |
Returns the type of the element. |
init
Create a new DSDecodedBarcodeElement
object.
- Objective-C
- Swift
- (instancetype)init;
init()
getText
Get the text of the decoded barcode.
- Objective-C
- Swift
- (NSString *)getText
func getText() -> String
Return Value
The text of the decoded barcode.
setText
Set the text of the decoded barcode. The byte of the barcode is changed as well.
- Objective-C
- Swift
- (NSInteger)setText:(NSString *)text
func setText(text: String) -> NSInteger
Parameters
[in] text
: The text of the decoded barcode.
Return Value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getBytes
Get the bytes of the decoded barcode.
- Objective-C
- Swift
- (NSData *)getBytes
func getBytes() -> NSData
Return Value
The bytes of the decoded barcode.
setBytes
Set the bytes of the decoded barcode. The text of the barcode is changed as well.
- Objective-C
- Swift
- (NSInteger)setBytes:(NSData *)bytes
func setBytes(bytes: NSData) -> NSInteger
Parameters
[in] bytes
: The bytes of the decoded barcode.
Return Value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getFormat
Get the format of the decoded barcode.
- Objective-C
- Swift
- (DSBarcodeFormat)getFormat
func getFormat() -> BarcodeFormat
Return Value
The format of the decoded barcode.
setFormat
Set the format of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)setFormat:(DSBarcodeFormat)format
func setFormat(_ format: BarcodeFormat) -> NSInteger
Parameters
[in] format
: The format of the decoded barcode.
Return Value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getConfidence
Get the confidence of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)getConfidence
func getConfidence() -> NSInteger
Return Value
The confidence of the decoded barcode.
setConfidence
Set the confidence of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)setConfidence:(NSInteger)confidence
func setConfidence(_ confidence: NSInteger) -> NSInteger
Parameters
[in] confidence
: The confidence of the decoded barcode.
Return Value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getFormatString
Get the format string of the decoded barcode.
- Objective-C
- Swift
- (NSString *)getFormatString
func getFormatString() -> String
Return Value
The format string of the decoded barcode.
getAngle
Get the angle of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)getAngle
func getAngle() -> NSInteger
Return Value
The angle of the decoded barcode.
getModuleSize
Get the module size of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)getModuleSize
func getModuleSize() -> NSInteger
Return Value
The module size of the decoded barcode.
getDetails
Get the details of the decoded barcode.
- Objective-C
- Swift
- (DSBarcodeDetails *)getDetails
func getDetails() -> BarcodeDetails
Return Value
The details of the decoded barcode.
getExtendedBarcodeResults
Get the extended barcode results of the decoded barcode.
- Objective-C
- Swift
- (nullable NSArray<DSExtendedBarcodeResult *>*)getExtendedBarcodeResults
func getExtendedBarcodeResults() -> [ExtendedBarcodeResult]?
Return Value
The extended barcode results of the decoded barcode.
isDPM
Check if the decoded barcode is DPM.
- Objective-C
- Swift
- (BOOL)isDPM
func isDPM() -> Bool
Return Value
Returns true
if the decoded barcode is DPM. Otherwise, returns false
.
isMirrored
Check if the decoded barcode is mirrored.
- Objective-C
- Swift
- (BOOL)isMirrored
func isMirrored() -> Bool
Return Value
Returns true
if the decoded barcode is mirrored. Otherwise, returns false
.