GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / BarcodeAztecWrite Method / BarcodeAztecWrite(Int32,String,BarcodeAztecCodeVersion,Int32,Int32,Int32,Int32,Int32,Single,Color,Color) 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.
Color of the background.
Example





In This Topic
BarcodeAztecWrite(Int32,String,BarcodeAztecCodeVersion,Int32,Int32,Int32,Int32,Int32,Single,Color,Color) 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 Color, _
   ByVal BackColor As Color _
) As GdPictureStatus
public GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   string Data,
   ref BarcodeAztecCodeVersion Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   Color FillColor,
   Color BackColor
)
public function BarcodeAztecWrite( 
    ImageID: Integer;
    Data: String;
   var  Version: BarcodeAztecCodeVersion;
    EccPercent: Integer;
    QuietZone: Integer;
    ModuleSize: Integer;
    DstLeft: Integer;
    DstTop: Integer;
    Angle: Single;
    FillColor: Color;
    BackColor: Color
): GdPictureStatus; 
public function BarcodeAztecWrite( 
   ImageID : int,
   Data : String,
   Version : BarcodeAztecCodeVersion,
   EccPercent : int,
   QuietZone : int,
   ModuleSize : int,
   DstLeft : int,
   DstTop : int,
   Angle : float,
   FillColor : Color,
   BackColor : Color
) : GdPictureStatus;
public: GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   string* Data,
   ref BarcodeAztecCodeVersion Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   Color FillColor,
   Color BackColor
) 
public:
GdPictureStatus BarcodeAztecWrite( 
   int ImageID,
   String^ Data,
   BarcodeAztecCodeVersion% Version,
   int EccPercent,
   int QuietZone,
   int ModuleSize,
   int DstLeft,
   int DstTop,
   float Angle,
   Color FillColor,
   Color 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.
BackColor
Color of the background.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
Use the GetStat() method to determine if this method has been successful.

This method requires the Barcode Reading & Writing component to run.

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;
    Color fillColor = gdpictureImaging.ARGB(255, 0, 0, 0);
    Color backColor = gdpictureImaging.ARGB(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