Returns the height and width of specified barcode symbol, in pixels, that's represented in the TImage, TQRImage, or TQRGzImage control specified by the Image property.
function Size(var Width, Height, SymbolWidth, SymbolHeight: Integer): Boolean; virtual;
The method returns the width and height of the barcode symbol that's represented in the TImage, TQRImage, or TQRGzImage control specified by the Image property, in pixels. If the quiet zones are represented (please read the ShowQuietZone property about whether or not the quiet zones will be represented), they are included in the barcode symbol.
Width: Integer; Returns the horizontal width of the rotated barcode symbol that's displyed in the TImage, TQRImage, or TQRGzImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
If the quiet zones are represented (please read the ShowQuietZone property about whether or not the quiet zones will be represented), they are included. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the TBarcode2D_Code16K barcode components, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone property is set to false. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the 2D component TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC, if its Linear property is set, the 2D symbol and the linear symbol are assembled to generate an EAN.UCC composite barcode symbol. The parameter returns the width of entire EAN.UCC composite barcode symbol, namely, the linear symbol is included in the barcode symbol. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
When the linear component of TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC component is TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN8, TBarcode1D_EAN13, or TBarcode1D_EAN128, and its human readable text is represented. The human readable text and the vertical spacing between the text and linear symbol are included in the barcode symbol. If the TextAlignment property isn't set to taCustom, and the human readable text exceeds entire EAN.UCC composite barcode symbol in horizontal direction, the excess is included in the barcode symbol. If the TextAlignment property is set to taCustom, the width of quiet zone marks and their horizontal spacing (LeftQuietZoneSpacing and RightQuietZoneSpacing) are included too (if they are represented, this does not apply to TBarcode1D_EAN128). If the human readable text exceeds the linear barcode symbol in vertical direction, the excess is included too. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
The value of Width is calculated using following method:
When the Stretch property is set to false, it's calculated based on the Module property value.
When the Stretch property is set to true:
When the Orientation property is set to "boLeftRight" or "boRightLeft":
If the BarcodeWidth property value is greater than zero, it's same to the BarcodeWidth property value.
If the BarcodeWidth property value is equal to zero, the LeftMargin property value will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeWidth property value is less than zero, the LeftMargin property value, and the absolute value of the negative BarcodeWidth property value (i.e. the right margin) will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop":
If the BarcodeHeight property value is greater than zero, it's same to the BarcodeHieght property value.
If the BarcodeHeight property value is equal to zero, the LeftMargin property value will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeHeight property value is less than zero, the LeftMargin property value, and the absolute value of the negative BarcodeHeight property value (i.e. the right margin) will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
Height: Integer; Returns the vertical height of the rotated barcode symbol that's displyed in the TImage, TQRImage, or TQRGzImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
If the quiet zones are represented (please read the ShowQuietZone property about whether or not the quiet zones will be represented), they are included. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the TBarcode2D_Code16K barcode components, if the Orientation property is set to "boTopBottom" or "boBottomTop", the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone property is set to false. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the 2D component TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC components, if its Linear property is set, the 2D symbol and the linear symbol are assembled to generate an EAN.UCC composite barcode symbol. The parameter returns the height of entire EAN.UCC composite barcode symbol, namely, the linear symbol is included in the barcode symbol. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
When the linear component of TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC component is TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN8, TBarcode1D_EAN13, or TBarcode1D_EAN128, and its human readable text is represented. The human readable text and the vertical spacing between the text and linear symbol are included in the barcode symbol. If the TextAlignment property isn't set to taCustom, and the human readable text exceeds entire EAN.UCC composite barcode symbol in horizontal direction, the excess is included in the barcode symbol. If the TextAlignment property is set to taCustom, the width of quiet zone marks and their horizontal spacing (LeftQuietZoneSpacing and RightQuietZoneSpacing) are included too (if they are represented, this does not apply to TBarcode1D_EAN128). If the human readable text exceeds the linear barcode symbol in vertical direction, the excess is included too. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
The value of Height is calculated using following method:
When the Stretch property is set to false, it's calculated based on the Module property value.
When the Stretch property is set to true:
When the Orientation property is set to "boLeftRight" or "boRightLeft":
If the BarcodeHeight property value is greater than zero, it's same to the BarcodeHeight property value.
If the BarcodeHeight property value is equal to zero, the TopMargin property value will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeHeight property value is less than zero, the TopMargin property value, and the absolute value of the negative BarcodeHeight property value (i.e. the bottom margin) will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop":
If the BarcodeWidth property value is greater than zero, it's same to the BarcodeWidth property value.
If the BarcodeWidth property value is equal to zero, the TopMargin property value will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeWidth property value is less than zero, the TopMargin property value, and the absolute value of the negative BarcodeWidth property value (i.e. the bottom margin) will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
SymbolWidth: Integer; Returns the distance between the leading and trailing of the rotated barcode symbol that's displyed in the TImage, TQRImage, or TQRGzImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
If the quiet zones are represented (please read the ShowQuietZone property about whether or not the quiet zones will be represented), the leading quiet zone and the trailing quiet zone are included. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the TBarcode2D_Code16K barcode components, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone property is set to false. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the 2D component TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC, if its Linear property is set, the 2D symbol and the linear symbol are assembled to generate an EAN.UCC composite barcode symbol. The parameter returns the width of entire EAN.UCC composite barcode symbol, namely, the linear symbol is included in the barcode symbol. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
When the linear component of TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC component is TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN8, TBarcode1D_EAN13, or TBarcode1D_EAN128, and its human readable text is represented. If the TextAlignment property isn't set to taCustom, and the human readable text exceeds entire EAN.UCC composite barcode symbol in horizontal direction, the excess is included in the barcode symbol. If the TextAlignment property is set to taCustom, the width of quiet zone marks and their horizontal spacing (LeftQuietZoneSpacing and RightQuietZoneSpacing) are included too (if they are represented, this does not apply to TBarcode1D_EAN128). See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
The value of SymbolWidth is calculated using following method:
When the Stretch property is set to false, it's calculated based on the Module property value.
When the Stretch property is set to true:
If the BarcodeWidth property value is greater than zero, it's same to the BarcodeWidth property value.
If the BarcodeWidth property value is equal to zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the LeftMargin property value will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop", the TopMargin property value will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeWidth property value is less than zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the LeftMargin property value, and the absolute value of the negative BarcodeWidth property value (i.e. the right margin) will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop", the TopMargin property value, and the absolute value of the negative BarcodeWidth property value (i.e. the bottom margin) will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
See also the "BarcodeWidth" property.
SymbolHeight: Integer; Returns the distance between the top and bottom of the rotated barcode symbol that's displyed in the TImage, TQRImage, or TQRGzImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
If the quiet zones are represented (please read the ShowQuietZone property about whether or not the quiet zones will be represented), the top quiet zone and the bottom quiet zone are included. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
For the 2D component TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC, if it's Linear property is set, the 2D symbol and the linear symbol are assembled to generate an EAN.UCC composite barcode symbol. The parameter returns the height of entire EAN.UCC composite barcode symbol, namely, the linear symbol is included in the barcode symbol. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
When the linear component of TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC component is TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN8, TBarcode1D_EAN13, or TBarcode1D_EAN128, and its human readable text is represented. The human readable text and the vertical spacing between the text and linear symbol are included in the barcode symbol. If the human readable text exceeds the linear barcode symbol in vertical direction, the excess is included too. See diagram (the SpaceColor property value is set to clSilver in order to accentuate the quiet zones):
The value of SymbolHeight is calculated using following method:
When the Stretch property is set to false, it's calculated based on the Module property value.
When the Stretch property is set to true:
If the BarcodeHeight property value is greater than zero, it's same to the BarcodeHeight property value.
If the BarcodeHeight property value is equal to zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the TopMargin property value will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop", the LeftMargin property value will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
If the BarcodeHeight property value is less than zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the TopMargin property value, and the absolute value of the negative BarcodeHeight property value (i.e. the bottom margin) will be subtracted from the height of TImage, TQRImage, or TQRGzImage control that's specified by Image property, then the result will be returned.
When the Orientation property is set to "boTopBottom" or "boBottomTop", the LeftMargin property value, and the absolute value of the negative BarcodeHeight property value (i.e. the right margin) will be subtracted from the width of TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be returned.
See also the "BarcodeHeight" property.
If the method succeeds, the return value is true.
For the Delphi/C++ Builder 2007 or early, if the length of Barcode property value is invalid, or there is any invalid character in the Barcode property value, the return value is false. Corresponding to the OnInvalidLength event or the OnInvalidChar event will occur.
For Delphi/C++ Builder 2009 or later, if you use the Barcode property to specify the barcode text, when the length of Barcode property value is invalid, or there is any invalid character in the Barcode property value, the return value is false. Corresponding to the OnInvalidLength event or the OnInvalidChar event will occur. If you use the Data property to specify the barcode text, when the length of Data property value is invalid, or there is any invalid character in the Data property value, the return value is false. Corresponding to the OnInvalidDataLength event or the OnInvalidDataChar event will occur.
For the TBarcode2D_CCA, TBarcode2D_CCB, and TBarcode2D_CCC components, if the Linear property is set, and the length of its Barcode or Data (only for Delphi/C++ Builder 2009 or later) property value is invalid, the return value is false too, corresponding to the OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur. If there is any invalid character in the Barcode or Data (only for Delphi/C++ Builder 2009 or later) property value, the return value is false too, corresponding to the OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
For the TBarcode2D_CCA, TBarcode2D_CCB, and TBarcode2D_CCC 2D components, if the Linear property is set to one of TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN8, TBarcode1D_EAN13, and TBarcode1D_EAN128 components, and the Image property is not set, the human readable text of linear component will not be consulted.