Package com.ironsoftware.ironpdf.edit
Class Length
java.lang.Object
com.ironsoftware.ironpdf.edit.Length
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 Summary
ConstructorsConstructorDescriptionLength()Gets default length : 0%Length(double value) Instantiates a new Length.Length(double value, MeasurementUnit unit) Instantiates a new Length. -
Method Summary
Modifier and TypeMethodDescriptionfinal MeasurementUnitgetUnit()Gets unit.final doublegetValue()Gets value.final voidsetUnit(MeasurementUnit value) Sets unit.final voidsetValue(double value) Sets value.
-
Constructor Details
-
Length
public Length(double value) Instantiates a new Length. Default MeasurementUnit isMeasurementUnit.PERCENTAGE- Parameters:
value- the value
-
Length
Instantiates a new Length. A length value withMeasurementUnit.- Parameters:
value- the valueunit- the unit
-
Length
public Length()Gets default length : 0%
-
-
Method Details
-
getUnit
Gets unit.MeasurementUnit- Returns:
- the unit
-
setUnit
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
-