QRCodeBarcodeShape ErrorCorrectionLevel
Gets or sets the error correction level of the QR bar code shape. The error correction level indicates how much redundancy is used to encode the data in to the QR code. The amount of data that can be stored gets lesser and lesser with increase of correction level.
public QRCodeErrorCorrectionLevel ErrorCorrectionLevel {get;Set} |
Return value
QRCodeErrorCorrectionLevel | Error correction level used |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
QRCodeBarcodeShape qrBarcode = new QRCodeBarcodeShape();
qrBarcode.Angle = 0;
qrBarcode.AutoExpand = true;
qrBarcode.CodeSize = QRCodeSize.S21x21;
qrBarcode.EncodingMode = QRCodeEncodingMode.Alphanumeric;
qrBarcode.ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.H;
qrBarcode.FlipHorizontally = false;
qrBarcode.FlipVertically = false;
qrBarcode.Height = 5;
qrBarcode.InvertImage = false;
qrBarcode.Location = new Point3D(0, 0, 0);
qrBarcode.MarkingOrder = MarkingOrder.HatchBeforeOutline;
qrBarcode.MaskPattern = QRCodeMaskPattern.DefaultMaskPattern;
qrBarcode.QuietZone = false;
qrBarcode.Text = "SMAPI VER 4";
qrBarcode.HatchingDirection = BarcodeScanDirection.TopToBottom;
qrBarcode.HatchLineDirection = BarcodeScanDirection.LeftToRight;
qrBarcode.HatchPattern = BarcodeHatchPattern.CreateLineHatchPattern(0.5f, true, false);
vectorImage.AddBarcode(qrBarcode);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}