Package com.ironsoftware.ironpdf.edit
Class Length
- java.lang.Object
-
- com.ironsoftware.ironpdf.edit.Length
-
public class Length extends Object
A length value withMeasurementUnit
Allows use and interchange of units such as inches, mm, pt, percentages, pixels and points when editing a PDF.
-
-
Constructor Summary
Constructors Constructor Description Length()
Gets default length : 0%Length(double value)
Instantiates a new Length.Length(double value, MeasurementUnit unit)
Instantiates a new Length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MeasurementUnit
getUnit()
Gets unit.double
getValue()
Gets value.void
setUnit(MeasurementUnit value)
Sets unit.void
setValue(double value)
Sets value.
-
-
-
Constructor Detail
-
Length
public Length(double value)
Instantiates a new Length. Default MeasurementUnit isMeasurementUnit.PERCENTAGE
- Parameters:
value
- the value
-
Length
public Length(double value, MeasurementUnit unit)
Instantiates a new Length. A length value withMeasurementUnit
.- Parameters:
value
- the valueunit
- the unit
-
Length
public Length()
Gets default length : 0%
-
-
Method Detail
-
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
-
-