GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / BarcodeAztecWrite Method / BarcodeAztecWrite(Int32,String,BarcodeAztecCodeVersion,Int32,Int32,Int32,Int32,Int32,Single,Int32,Int32) Method
GdPicture image identifier.
The data of the barcode to encode.
A member of the BarcodeAztecCodeVersion enumeration. The version of the Aztec barcode. Use BarcodeAztecCodeVersionAuto to let the engine decide the minimum version required to encode all data.
The percentage of error correction codewords. It could be a value from 5 to 95. A value of 23 is recommended.
The size, in pixels, of the quiet zone around the barcode. It could be 0, because Aztec barcodes does no require a mandatory quiet zone.
The size of each module, in pixels.
The left position, in pixels, of the Aztec barcode.
The top position, in pixels, of the Aztec barcode.
The Aztec barcode angle.
Color of the symbols. A suitable color value can be obtained by using the ARGBI() method.
Color of the background. A suitable color value can be obtained by using the ARGBI() method.
Example





In This Topic
BarcodeAztecWrite(Int32,String,BarcodeAztecCodeVersion,Int32,Int32,Int32,Int32,Int32,Single,Int32,Int32) Method
In This Topic
Draws an Aztec barcode on a GdPicture image.
Syntax
'Declaration
 
Public Overloads Function BarcodeAztecWrite( _
   ByVal ImageID As Integer, _
   ByVal Data As String, _
   ByRef Version As BarcodeAztecCodeVersion, _
   ByVal EccPercent As Integer, _
   ByVal QuietZone As Integer, _
   ByVal ModuleSize As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal Angle As Single, _
   ByVal FillColor As Integer, _
   ByVal BackColor As Integer _
) As GdPictureStatus
public GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   string Data,
   ref BarcodeAztecCodeVersion Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   int FillColor,
   int BackColor
)
public function BarcodeAztecWrite( 
    ImageID: Integer;
    Data: String;
   var  Version: BarcodeAztecCodeVersion;
    EccPercent: Integer;
    QuietZone: Integer;
    ModuleSize: Integer;
    DstLeft: Integer;
    DstTop: Integer;
    Angle: Single;
    FillColor: Integer;
    BackColor: Integer
): GdPictureStatus; 
public function BarcodeAztecWrite( 
   ImageID : int,
   Data : String,
   Version : BarcodeAztecCodeVersion,
   EccPercent : int,
   QuietZone : int,
   ModuleSize : int,
   DstLeft : int,
   DstTop : int,
   Angle : float,
   FillColor : int,
   BackColor : int
) : GdPictureStatus;
public: GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   string* Data,
   ref BarcodeAztecCodeVersion Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   int FillColor,
   int BackColor
) 
public:
GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   String^ Data,
   BarcodeAztecCodeVersion% Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   int FillColor,
   int BackColor
) 

Parameters

ImageID
GdPicture image identifier.
Data
The data of the barcode to encode.
Version
A member of the BarcodeAztecCodeVersion enumeration. The version of the Aztec barcode. Use BarcodeAztecCodeVersionAuto to let the engine decide the minimum version required to encode all data.
EccPercent
The percentage of error correction codewords. It could be a value from 5 to 95. A value of 23 is recommended.
QuietZone
The size, in pixels, of the quiet zone around the barcode. It could be 0, because Aztec barcodes does no require a mandatory quiet zone.
ModuleSize
The size of each module, in pixels.
DstLeft
The left position, in pixels, of the Aztec barcode.
DstTop
The top position, in pixels, of the Aztec barcode.
Angle
The Aztec barcode angle.
FillColor
Color of the symbols. A suitable color value can be obtained by using the ARGBI() method.
BackColor
Color of the background. A suitable color value can be obtained by using the ARGBI() method.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
Use the GetStat() method to determine if this method has been successful.
Example
Rendering an Aztec barcode into a new image and saving the result into a png file.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // String with numbers, which have to be encoded into a barcode.
    string data = "123456";
 
    BarcodeAztecCodeVersion version = BarcodeAztecCodeVersion.BarcodeAztecCodeVersionAuto;
    int moduleSize = 8;
    int fillColor = gdpictureImaging.ARGBI(255, 0, 0, 0);
    int backColor = gdpictureImaging.ARGBI(0, 255, 255, 255);
    int dstLeft = 10;
    int dstTop = 10;
 
    // Compute size (in pixels), required to render an Aztec barcode.
    gdpictureImaging.BarcodeAztecGetSize(data, ref version, 23, 0, moduleSize, out int width, out int height);
 
    int imageID = gdpictureImaging.CreateNewGdPictureImage(20 + width, 20 + height, 32, Color.White);
    gdpictureImaging.BarcodeAztecWrite(imageID, data, ref version, 23, 0, moduleSize, dstLeft, dstTop, 0, fillColor, backColor);
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also