[]
Represents a barcode that can be drawn on a GcGraphics. The supported barcode types are represented by the CodeType enum.
public class GcBarcode
Initializes a new instance of the GcBarcode class.
public GcBarcode()
Gets or sets the barcode encoding. The default is Code39.
public CodeType CodeType { get; set; }
Gets or sets the horizontal alignment of the barcode.
public ImageAlignHorz HorizontalAlignment { get; set; }
Gets the BarcodeOptions object defining the barcode.
public BarcodeOptions Options { get; }
Gets or sets the scale factor applied to the barcode image and caption. The default is 1, larger values increase the barcode size, lesser decrease.
public float ScaleFactor { get; set; }
Gets or sets the value that is encoded by the barcode.
public string Text { get; set; }
Gets or sets the text format used to draw the barcode label.
public TextFormat TextFormat { get; set; }
Gets or sets the vertical alignment of the barcode.
public ImageAlignVert VerticalAlignment { get; set; }
Gets the barcode caption. In some cases this may differ from the encoded value.
public string GetCaption()
The barcode caption.
Renders the current barcode into a new instance of GcBitmap with the specified resolution. It is the responsibility of the caller to dispose the returned bitmap after use.
Note that when the bitmap is drawn on a GcPdfGraphics, it must not be disposed until after the target PDF is saved.
public GcBitmap ToGcBitmap(int dpi = 300, bool aliased = false)
dpi
intThe resolution of the generated bitmap.
aliased
boolWhether the barcode is drawn without anti-aliasing