(TBarcodeFmx2D_QRCode)
Returns the parity value of a barcode text that will be encoded into a series of structured append symbols.
function GetParity(Data: TBytes; AllowEscape: Boolean; var InvalidIndex: Integer): Byte; virtual;
The method returns the parity value of a barcode text that will be encoded into a series of structured append symbols. The value will be used in the structured append block, and the structured append block will be used by each symbol in the series of QRCode structured append symbols. See also the "Structured append" section in the "TBarcodeFmx2D_QRCode" article.
Data: TBytes; It's the original input text before division into the each symbol in the series of structured append symbols. It is of type TBytes (it is in fact a byte array). You can use the method to caculate the check sum of a block of binary (bytes) data.
See also the "Data" property article.
AllowEscape: Boolean; Specifies whether to allow users to insert the escape sequences to the Data parameter value, in order to place the function characters and additional control information.
See also the "Escape sequences" section in the "TBarcodeFmx2D_QRCode" article and the "AllowEscape" property article.
InvalidIndex: Integer; If there is any invalid byte value in the barcode text that is specified by the Data parameter, the parameter returns the position index of first invalid byte value, the index 0 denotes that the first byte is invalid. Otherwise, it returns the Verify_OK (-1).
This method can return one of these values (these consts are defined in the pfmxCore2D unit):
Verify_OK (-1):
It indicates the method succeeds.
Verify_InvalidIndex_Base (0), and greater than 0:
It indicates that an invalid byte value is in the Data parameter, the return value is the position index of the invalid byte value. The index 0 denotes that the first byte value is invalid.
If the method succeeds, it returns the parity value, it's an 8-bit byte value, and the InvalidIndex parameter returns Verify_OK (-1). If the method fails, the InvalidIndex parameter returns a position index of first invalid byte in the Data parameter, it's an integer value greater than or equal to zero. See also the InvalidIndex parameter section above.
See also the "Structured append" section in the "TBarcodeFmx2D_QRCode" article.