Aspose::BarCode::Generation::Unit class

Unit class

Specifies the size value in different units (Pixel, Inches, etc.).

class Unit : public System::Object

Methods

MethodDescription
Equals(System::SharedPtr<System::Object>) overrideDetermines whether this instance and a specified object, which must also be a Unit object, have the same value.
get_Document()Gets size value in document units.
get_Inches()Gets size value in inches.
get_Millimeters()Gets size value in millimeters.
get_Pixels()Gets size value in pixels.
get_Point()Gets size value in point.
get_Resolution()Resolution.
GetHashCode() const overrideReturns the hash code for this object.
set_Document(float)Sets size value in document units.
set_Inches(float)Sets size value in inches.
set_Millimeters(float)Sets size value in millimeters.
set_Pixels(float)Sets size value in pixels.
set_Point(float)Sets size value in point.
ToString() const overrideReturns a human-readable string representation of this Unit.

Remarks

This sample shows how to create and save a BarCode image.

[C#]
  using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128))
  {
      generator.Parameters.Barcode.BarHeight.Millimeters = 10;
      generator.Save("test.png");
  }

See Also