DSDecodedBarcodeElement Class
DSDecodedBarcodeElement
extends the DSRegionObjectElement
class and represents a decoded barcode element.
Definition
Assembly: DynamsoftBarcodeReader.xcframework
- Objective-C
- Swift
@interface DSDecodedBarcodeElement: DSRegionObjectElement
class DecodedBarcodeElement: RegionObjectElement
Methods
Methods | Description |
---|---|
init |
Initialize a new DSDecodedBarcodeElement object. |
getText |
Returns the text of the decoded barcode. |
setText |
Set the text of the decoded barcode. |
getBytes |
Returns the raw bytes of the decoded barcode. |
setBytes |
Set the raw bytes of the decoded barcode. |
getFormat |
Returns the format of the decoded barcode. |
setFormat |
Set the format of the decoded barcode. |
getConfidence |
Returns the confidence score of the decoded barcode. |
setConfidence |
Set the confidence of the decoded barcode. |
getFormatString |
Returns the format string of the decoded barcode. |
getAngle |
Returns the orientation angle of the decoded barcode. |
getModuleSize |
Returns the module size of the decoded barcode. |
getDetails |
Returns the DSBarcodeDetails of the decoded barcode. |
getExtendedBarcodeResults |
Returns the extended barcode results of the decoded barcode. |
isDPM |
Specifies if the decoded barcode is a DPM code or not. |
isMirrored |
Specifies if the decoded barcode is mirrored or not. |
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
Returns the text of the decoded barcode.
- Objective-C
- Swift
- (NSString *)getText
func getText() -> String
Return Value
A string representing the text of the decoded barcode.
setText
Set the text of the decoded barcode. The barcode bytes are changed as well to reflect the new text.
- Objective-C
- Swift
- (NSInteger)setText:(NSString *)text
func setText(text: String) -> NSInteger
Parameters
[in] text
: The text to be set for the decoded barcode.
Return Value
Returns the ErrorCode
if it fails. Otherwise, returns 0.
getBytes
Returns the raw bytes of the decoded barcode.
- Objective-C
- Swift
- (NSData *)getBytes
func getBytes() -> NSData
Return Value
A NSData object representing the raw bytes of the decoded barcode.
setBytes
Set the raw bytes of the decoded barcode. The text of the barcode will change to reflect the new barcode bytes.
- 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 it fails. Otherwise, returns 0.
getFormat
Returns the format of the decoded barcode as a DSBarcodeFormat
item.
- Objective-C
- Swift
- (DSBarcodeFormat)getFormat
func getFormat() -> BarcodeFormat
Return Value
A DSBarcodeFormat
item representing the format of the decoded barcode.
setFormat
Set the format of the decoded barcode using a DSBarcodeFormat
item.
- 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 it fails. Otherwise, returns 0.
getConfidence
Returns the confidence score of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)getConfidence
func getConfidence() -> NSInteger
Return Value
An integer representing the confidence score.
setConfidence
Set the confidence score 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 it fails. Otherwise, returns 0.
getFormatString
Returns the format of the decode barcode as a string.
- Objective-C
- Swift
- (NSString *)getFormatString
func getFormatString() -> String
Return Value
A string representing the format of the barcode.
getAngle
Returns the orientation angle of the decoded barcode should it be rotated in any way.
- Objective-C
- Swift
- (NSInteger)getAngle
func getAngle() -> NSInteger
Return Value
An integer representing the orientation angle of the barcode.
getModuleSize
Returns the module size of the decoded barcode.
- Objective-C
- Swift
- (NSInteger)getModuleSize
func getModuleSize() -> NSInteger
Return Value
An integer representing the module size of the decoded barcode.
getDetails
Returns the BarcodeDetails
of the decoded barcode.
- Objective-C
- Swift
- (DSBarcodeDetails *)getDetails
func getDetails() -> BarcodeDetails
Return Value
A DSBarcodeDetails
object representing the details of the decoded barcode.
getExtendedBarcodeResults
Returns the extended barcode result(s) of the decoded barcode as a DSExtendedBarcodeResult
object. Please visit the DSExtendedBarcodeResult
page to learn more of what information is contained there.
- Objective-C
- Swift
- (nullable NSArray<DSExtendedBarcodeResult *>*)getExtendedBarcodeResults
func getExtendedBarcodeResults() -> [ExtendedBarcodeResult]?
Return Value
An array of DSExtendedBarcodeResult
that represents the extended barcode results.
isDPM
Specifies if the decoded barcode is a Direct Part Marking (DPM) code or not. DPM codes are read by setting the DPMCodeReadingModes
.
- Objective-C
- Swift
- (BOOL)isDPM
func isDPM() -> Bool
Return Value
A BOOL
value describing whether the barcode is a DPM code or not.
isMirrored
Specifies if the decoded barcode is mirrored or not. Mirrored barcodes are read by setting the MirrorMode
.
- Objective-C
- Swift
- (BOOL)isMirrored
func isMirrored() -> Bool
Return Value
A BOOL
value describing whether the barcode is mirrored or not.