<< Click to Display Table of Contents >> VpeRenderAztec |
[Professional Edition and above only]
Computes the dimensions of an Aztec barcode.
void VpeRenderAztec(
VpeHandle hDoc,
LPCTSTR lpszText,
VpeCoord nWidth,
VpeCoord nHeight,
VpeCoord nModuleWidth
)
VpeHandle hDoc
Document Handle
LPCTSTR lpszText
the text of the barcode
VpeCoord nWidth, nHeight
With these two parameters you can specify a maximum size the barcode can have.
The following rules apply:
•nWidth and nHeight is specified: in this case the maximum rectangle of the barcode will be computed, which will fit into the given rectangle.
•Only nWidth is specified, nHeight is zero: In this case nHeight is computed (nWidth is also computed, i.e. adjusted).
•Only nHeight is specified, nWidth is zero: In this case nWidth is computed (nHeight is also computed, i.e. adjusted).
•nWidth and nHeight are zero: in this case the smallest possible rectangle is computed
VpeCoord nModuleWidth
If this parameter is zero, VPE will choose itself an optimum barcode module width. If it is non-zero, you can specify the width of a barcode module.
Example:
// Compute the smallest possible rectangle for a given text
VpeRenderAztec(hDoc, "This is a message", 0, 0, 0)
xsize = VpeGet(hDoc, VRENDERWIDTH)
ysize = VpeGet(hDoc, VRENDERHEIGHT)
// Insert the barcode into the document
VpeAztec(hDoc, 1, 1, -xsize, -ysize, "This is a message")
Remarks:
sets LastError
"Barcodes (2D)" in the Programmer's Manual