(TBarcode2D_CompactMatrix)
Specifies the priority order of selecing appropriate symbol size for a Compact Matrix barcode symbol.
type
{ Defined in the pCompactMatrix unit }
TCompactMatrix_StretchOrder = (soVersionSegment, soSegmentVersion, soFixAspect, soFixAspectWithQuietZones);
property StretchOrder: TCompactMatrix_StretchOrder;
There are 32 vertical sizes of Compact Matrix symbol, referred to as version 1 to 32, in increasing order of symbol height and data capacity. In horizontal orientation, each Compact Matrix symbol consists of an array of segments with a minimum of 1 segment (maximum 32 segments).
The minimum version (specified by the MinVersion property) and the minimum number of segments (specified by the MinSegments property) indicates the minimum symbol size for a Compact Matrix barcode symbol. The maximum version (specified by the MaxVersion property) and the maximum number of segments (specified by the MaxSegments property) indicates the maximum symbol size for the Compact Matrix barcode symbol. The property specifies a priority order in order to automatically select the symbol size. According to the priority order, the first symbol size (version and number of segments) that accommodates the barcode text will be automatically selected between the minimum symbol size and the maximum symbol size.
The property can be one of these values (defined in the pCompactMatrix unit):
soVersionSegment: If the Compact Matrix symbol that use minimum symbol size (specified by the MinVersion and MinSegments properties) cannot accommodate the barcode text, the symbol version will be increased firstly until it reachs the maximum value (specified by the MaxVersion property) or the barcode text is accommodated by the symbol. If the version has reached the maximum value (specified by the MaxVersion property) but the barcode text cannot yet be accommodated, the number of segments will be increased and the version will be reset to minimum value (specified by the MinVersion property). Repeat these until the barcode text is accommodated by the symbol, or not only does the version reach maximum value (specified by the MaxVersion property), but also the number of segments reachs maximum number of segments (specified by the MaxSegments property), in this case (the barcode text cannot always be accommodated), an OnInvalidLength (the barcode text is specified in the Barcode property) or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later, and the barcode text is specified in the Data property) event will occur.
soSegmentVersion: If the Compact Matrix symbol that use minimum symbol size (specified by the MinVersion and MinSegments properties) cannot accommodate the barcode text, the number of segments will be increased firstly until it reachs the maximum number of segments (specified by the MaxSegments property) or the barcode text is accommodated by the symbol. If the number of segments has reached the maximum number of segments (specified by the MaxSegments property) but the barcode text cannot yet be accommodated, the version will be increased and the number of segments will be reset to minimum number of segments (specified by the MinSegments property). Repeat these until the barcode text is accommodated by the symbol, or not only does the number of segments reach maximum number of segments (specified by the MaxSegments property), but also the version reachs maximum value (specified by the MaxVersion property), in this case (the barcode text cannot always be accommodated), an OnInvalidLength (the barcode text is specified in the Barcode property) or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later, and the barcode text is specified in the Data property) event will occur.
soFixAspect: An overall aspect ratio is specified by the minimum version (specified by the MinVersion property) and minumum number of segments (specified by the MinSegments property), the ratio is height to width of the symbol excluding quiet zones. Between the minimum symbol size (specified by the MinVersion and MinSegments properties) and the maximum symbol size (specified by the MaxVersion and MaxSegments properties), only symbol sizes that they approximately match the aspect ratio will be used. According to the data capacity, in increasing order of recovery capacity, the smallest symbol size that accommodates the barcode text will be automatically selected. If the barcode text cannot be accommodated by the maximum symbol size (specified by the MaxVersion and MaxSegments properties), an OnInvalidLength (the barcode text is specified in the Barcode property) or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later, and the barcode text is specified in the Data property) event will occur.
soFixAspectWithQuietZones: An overall aspect ratio is specified by the minimum version (specified by the MinVersion property) and minumum number of segments (specified by the MinSegments property), the ratio is height to width of the symbol including quiet zones. Between the minimum symbol size (specified by the MinVersion and MinSegments properties) and the maximum symbol size (specified by the MaxVersion and MaxSegments properties), only symbol sizes that they approximately match the aspect ratio will be used. According to the data capacity, in increasing order of recovery capacity, the smallest symbol size that accommodates the barcode text will be automatically selected. If the barcode text cannot be accommodated by the maximum symbol size (specified by the MaxVersion and MaxSegments properties), an OnInvalidLength (the barcode text is specified in the Barcode property) or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later, and the barcode text is specified in the Data property) event will occur.
See also the "Symbol sizes" section in the "TBarcode2D_CompactMatrix" article.