DSBarcodeResultItem Class
The DSBarcodeResultItem
class represents a barcode result item decoded by barcode reader. It is derived from DSCapturedResultItem
.
Definition
Assembly: DynamsoftBarcodeReader.xcframework
- Objective-C
- Swift
@interface DSBarcodeResultItem: DSCapturedResultItem
class BarcodeResultItem : DSCapturedResultItem
Attributes
Attributes | Type | Description |
---|---|---|
format |
DSBarcodeFormat | The format of the barcode. |
formatString |
NSString * | The format text of the barcode. |
text |
NSString * | The decode text of the barcode. |
bytes |
NSData * | The decode byte of the barcode. |
location |
DSQuadrilateral * | The location of the barcode. It is defined by the vertex coordinates of the quadrilateral. |
confidence |
NSInteger | The confidence of the decoding result. If the confidence is lower than 30, the result will not be output by default. |
angle |
NSInteger | The rotation angle of the barcode. |
moduleSize |
NSInteger | The module size of the barcode. |
details |
DSBarcodeDetails * | The details of the decoded barcode. |
isDPM |
BOOL | Whether the barcode is a DPM barcode. |
isMirrored |
BOOL | Whether the barcode is mirrored. |
Inherited Attributes
The following attributes are inherited from class DSCapturedResultItem
.
Attributes | Type | Description |
---|---|---|
type |
DSCapturedResultItemType | The type of the captured result item. |
referencedItem |
DSCapturedResultItem * | The referenced captured result item. The reference dependencies is defined in the Capture Vision settings. |
format
Returns the format of the barcode. This format will be one of the DSBarcodeFormat enumerations.
- Objective-C
- Swift
@property(nonatomic, readonly) DSBarcodeFormat format;
var format: DSBarcodeFormat { get }
formatString
Returns the format of the barcode, but as text instead of a DSBarcodeFormat
item.
- Objective-C
- Swift
@property(nonatomic, nullable, readonly) NSString *formatString;
var formatString: String? { get }
text
The raw decoded text of the barcode.
- Objective-C
- Swift
@property(nonatomic, nullable, readonly) NSString *text;
var text: String? { get }
bytes
Returns the raw bytes of the decoded barcode text.
- Objective-C
- Swift
@property(nonatomic, nullable, readonly) NSData *bytes;
var bytes: Data? { get }
location
Returns the location of the barcode as a DSQuadrilateral. The quadrilateral contains the four vertex points of the location, with the first vertex being the left-most vertex, and going in a clockwise direction.
- Objective-C
- Swift
@property(nonatomic, nullable, readonly) DSQuadrilateral *location;
var location: DSQuadrilateral? { get }
confidence
Returns the confidence of the decoded result, which is a measure of the result’s accuracy. If the confidence is lower than 30, the result will not be output by default.
- Objective-C
- Swift
@property(nonatomic, readonly) NSInteger confidence;
var confidence: Int { get }
angle
If the barcode is captured at an angle, this property returns the rotation angle of the barcode.
- Objective-C
- Swift
@property(nonatomic, readonly) NSInteger angle;
var angle: Int { get }
moduleSize
Returns the module size of the barcode.
- Objective-C
- Swift
@property(nonatomic, readonly) NSInteger moduleSize;
var moduleSize: Int { get }
details
Returns the details of the decoded barcode. DSBarcodeDetails can offer much more enhanced details specific to the barcode format of the decoded barcode. If you would like to learn more about how you can use these barcode details, please see this article on how to get detailed barcode info.
- Objective-C
- Swift
@property(nonatomic, nullable, readonly) DSBarcodeDetails *details;
var details: DSBarcodeDetails? { get }
isDPM
Tells you whether the barcode is a DPM barcode, which is a unique type of Datamatrix code.
- Objective-C
- Swift
@property(nonatomic, readonly) BOOL isDPM;
var isDPM: Bool { get }
isMirrored
Returns whether the barcode is mirrored.
- Objective-C
- Swift
@property(nonatomic, readonly) BOOL isMirrored;
var isMirrored: Bool { get }