Class Length

java.lang.Object
com.ironsoftware.ironpdf.edit.Length

public class Length extends Object
A length value with MeasurementUnit

Allows use and interchange of units such as inches, mm, pt, percentages, pixels and points when editing a PDF.

  • Constructor Details

    • Length

      public Length(double value)
      Instantiates a new Length. Default MeasurementUnit is MeasurementUnit.PERCENTAGE
      Parameters:
      value - the value
    • Length

      public Length(double value, MeasurementUnit unit)
      Instantiates a new Length. A length value with MeasurementUnit.
      Parameters:
      value - the value
      unit - the unit
    • Length

      public Length()
      Gets default length : 0%
  • Method Details

    • getUnit

      public final MeasurementUnit getUnit()
      Gets unit. MeasurementUnit
      Returns:
      the unit
    • setUnit

      public final void setUnit(MeasurementUnit value)
      Sets unit. MeasurementUnit
      Parameters:
      value - the value
    • getValue

      public final double getValue()
      Gets value.
      Returns:
      the value
    • setValue

      public final void setValue(double value)
      Sets value.
      Parameters:
      value - the value