LEADTOOLS Barcode (Leadtools.Barcode assembly)
LEAD Technologies, Inc

RotationAngle Property








Gets and sets the rotation (or skew) angle of this barcode in degrees. .NET support WinRT support Silverlight support
Syntax
[BrowsableAttribute(false)]
public virtual int RotationAngle {get; set;}
'Declaration
 
<BrowsableAttribute(False)>
Public Overridable Property RotationAngle As Integer
'Usage
 
Dim instance As BarcodeData
Dim value As Integer
 
instance.RotationAngle = value
 
value = instance.RotationAngle
[BrowsableAttribute(false)]
public virtual int RotationAngle {get; set;}
ObjectiveC Syntax
Java Syntax
BrowsableAttribute()
 get_RotationAngle();
set_RotationAngle(value);
[BrowsableAttribute(false)]
public:
virtual property int RotationAngle {
   int get();
   void set (    int value);
}

Property Value

The rotation (or skew) angle of this barcode in degrees. Default value is 0.
Remarks

Reading Barcodes

The BarcodeReader.ReadBarcode or BarcodeReader.ReadBarcodes methods are used to read a barcode or more from an image. Each of these methods returns an object or an array of objects of type BarcodeData for each barcode found. Inside each object, the value of the RotationAngle property will be set in degrees by the BarcodeReader object, referring to the angle of rotation of the barcode. If the barcode is not rotated, the value will be 0.

This value can be detected using a full circle (from -180 degrees to +180 degrees). Therefore, you can use the barcode rotation's angle to detect the whole document's skew angle. If the angle of a barcode is not 0 and you are certain the barcode is on a right angle in the image, then you pass the negative value of this angle to the Leadtools.ImageProcessing.RotateCommand class to correct the image skew. Note that LEADTOOLS always provides the Leadtools.ImageProcessing.Core.DeskewCommand that can be used to automatically correct image deskew without the presence of barcodes. Although this command can only correct skews between -20 and +20 degrees.

Note that the rotation angle does not determine whether the barcode is vertical or horizontal in the image. For that, you must set the correct options before reading the barcode. Refer to BarcodeSearchDirection for more information.

For a tutorial, refer to Reading Barcodes Tutorial.

Writing Barcodes

The RotationAngle property is not used when writing barcodes and the value set in this property will be ignored by the BarcodeWriter object.

For a tutorial, refer to Writing Barcodes Tutorial.

Example

This example will use RotationAngle to correct the skew angle of a document.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

BarcodeData Class
BarcodeData Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Barcode requires a Barcode Module license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features