Returns the height and width of specified barcode symbol, in pixels, that's displayed in the TImage control specified by the Image property.
function Size(var Width, Height, SymbolWidth, SymbolHeight: Single): Boolean; virtual;
The method returns the width and height of the barcode symbol that's displayed in the TImage control specified by the Image property, in pixels. If the quiet zones are displayed (please read the ShowQuietZone property about whether or not the quiet zones will be displayed), they are included in the barcode symbol.
Width: Single; Returns the horizontal width of the rotated barcode symbol that's displyed in the TImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
If the quiet zones are displayed (please read the ShowQuietZone property about whether or not the quiet zones will be displayed), they are included. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
For the TBarcodeFmx2D_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 claSilver in order to accentuate the quiet zones):
The value of Width parameter is calculated using following method:
The Stretch property is set to false, it's calculated based on the Module property value.
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 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 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 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 control that's specified by the Image property, then the result will be returned.
Height: Single; Returns the vertical height of the rotated barcode symbol that's displyed in the TImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
If the quiet zones are displayed (please read the ShowQuietZone property about whether or not the quiet zones will be displayed), they are included. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
For the TBarcodeFmx2D_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 claSilver in order to accentuate the quiet zones):
The value of Height is calculated using following method:
The Stretch property is set to false, it's calculated based on the Module property value.
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 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 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 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 control that's specified by the Image property, then the result will be returned.
SymbolWidth: Single; Returns the distance between the leading and trailing of the rotated barcode symbol that's displyed in the TImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
If the quiet zones are displayed (please read the ShowQuietZone property about whether or not the quiet zones will be displayed), the leading quiet zone and the trailing quiet zone are included. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
For the TBarcodeFmx2D_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 claSilver in order to accentuate the quiet zones):
The value of SymbolWidth is calculated using following method:
The Stretch property is set to false, it's calculated based on the Module property value.
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 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 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 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 control that's specified by the Image property, then the result will be returned.
See also the "BarcodeWidth" property.
SymbolHeight: Single; Returns the distance between the top and bottom of the rotated barcode symbol that's displyed in the TImage control specified in the Image property, in pixels. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
If the quiet zones are displyed (please read the ShowQuietZone property about whether or not the quiet zones will be displyed), the top quiet zone and the bottom quiet zone are included. See diagram (the SpaceColor property value is set to claSilver in order to accentuate the quiet zones):
The value of SymbolHeight is calculated using following method:
The Stretch property is set to false, it's calculated based on the Module property value.
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 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 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 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 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.
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 byte value in the Data property value, the return value is false. Corresponding to the OnInvalidDataLength event or the OnInvalidDataChar event will occur.