com.aspose.html.drawing

Class Length

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Unit>


    public final class Length
    extends Dimension

    Represents a length measurement unit.

    • Constructor Detail

      • Length

        public Length(double value,
                      UnitType type)

        Initializes a new instance of the Length class.

        Parameters:
        value - The value.
        type - The type.
      • Length

        public Length(double value,
                      UnitType type,
                      int resolution)

        Initializes a new instance of the Length class.

        Parameters:
        value - The value.
        type - The type.
        resolution - The resolution.
        Throws:
        com.aspose.ms.System.ArgumentException
    • Method Detail

      • initialize

        public void initialize(Unit.UnitInit data)

        Initializes a unit with a specified data.

        Overrides:
        initialize in class Numeric
        Parameters:
        data - The data.
      • op_Addition

        public static Length op_Addition(Length a,
                                         Length b)

        Implements the operator +.

        Parameters:
        a - Parameter a.
        b - Parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Arguments are null
        com.aspose.ms.System.ArgumentException - Arguments have different types or Arguments have different resolution or
      • op_Subtraction

        public static Length op_Subtraction(Length a,
                                            Length b)

        Implements the operator -.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Arguments are null
        com.aspose.ms.System.ArgumentException - Arguments have different types or Arguments have different resolutions or
      • op_LessThan

        public static boolean op_LessThan(Length a,
                                          Length b)

        Implements the operator <.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentException - Arguments have different types
        com.aspose.ms.System.ArgumentNullException - An argument is null
      • op_GreaterThan

        public static boolean op_GreaterThan(Length a,
                                             Length b)

        Implements the operator >.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentException - Arguments have different types
        com.aspose.ms.System.ArgumentNullException - An argument is null
      • op_LessThanOrEqual

        public static boolean op_LessThanOrEqual(Length a,
                                                 Length b)

        Implements the operator <=.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentException - Arguments have different types
        com.aspose.ms.System.ArgumentNullException - An argument is null
      • op_GreaterThanOrEqual

        public static boolean op_GreaterThanOrEqual(Length a,
                                                    Length b)

        Implements the operator >=.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
        Throws:
        com.aspose.ms.System.ArgumentException - Arguments have different types
        com.aspose.ms.System.ArgumentNullException - An argument is null
      • op_Equality

        public static boolean op_Equality(Length a,
                                          Length b)

        Implements the operator ==.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.
      • op_Inequality

        public static boolean op_Inequality(Length a,
                                            Length b)

        Implements the operator !=.

        Parameters:
        a - The parameter a.
        b - The parameter b.
        Returns:
        The result of the operator.