UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
BarWidths Class Reference

A class representing the widths of bars in barcodes for TSPL. More...

#include <BarWidths.h>

Inheritance diagram for BarWidths:
ABarWidths <IBarWidths>

Instance Methods

(instancetype) - init
 Initializes a new instance of the BarWidths class.
 
(instancetype) - initWithNarrowBar:wideBar:
 Initializes a new instance of the BarWidths class with specified narrow and wide bar widths.
 
(NSString *) - bcdMagnification1DWithType:printPlane:barWidths:
 Calculates the magnification of a 1D barcode with the specified type, print plane, and bar widths.
 
- Instance Methods inherited from ABarWidths
(instancetype) - NS_UNAVAILABLE
 

Additional Inherited Members

- Properties inherited from <IBarWidths>
id< IRulerruler
 Ruler to use for bar widths.
 
float narrowBar
 Width of smallest bar. This is typically referred to as the X-dimension of the barcode.
 
float wideBar
 Width of widest bar. This is typically a multiple of the NarrowBar in order for barcode scanners to differentiate bar widths.
 

Detailed Description

A class representing the widths of bars in barcodes for TSPL.

This class inherits from ABarWidths and provides functionality for initializing bar widths and calculating barcode magnifications in TSPL.

Method Documentation

◆ bcdMagnification1DWithType:printPlane:barWidths:

- (NSString *) bcdMagnification1DWithType: (BarcodeTypeEnum1D) bcdType
printPlane: (PrintPlane *) pp
barWidths: (BarWidths *) barWidths 

Calculates the magnification of a 1D barcode with the specified type, print plane, and bar widths.

Parameters
bcdTypeThe type of the 1D barcode.
ppThe print plane to be used.
barWidthsThe bar widths to be used for magnification calculation.
Returns
A string representing the magnification of the 1D barcode.

◆ init

- (instancetype) init

Initializes a new instance of the BarWidths class.

Returns
A new instance of BarWidths.

◆ initWithNarrowBar:wideBar:

- (instancetype) initWithNarrowBar: (float) narrowBar
wideBar: (float) wideBar 

Initializes a new instance of the BarWidths class with specified narrow and wide bar widths.

Parameters
narrowBarThe width of the narrow bar.
wideBarThe width of the wide bar.
Returns
A new instance of BarWidths.

Reimplemented from ABarWidths.


The documentation for this class was generated from the following file: