com.aspose.html.drawing

Class Resolution

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


    public class Resolution
    extends Dimension

    Represents a resolution unit.

    • Constructor Detail

      • Resolution

        public Resolution(double value,
                          UnitType type)

        Initializes a new instance of the Resolution class.

        Parameters:
        value - The value.
        type - The type.
    • Method Detail

      • to_Resolution

        public static Resolution to_Resolution(double value)

        Performs an implicit conversion from double to Resolution.

        Parameters:
        value - The value treated as dpi.
        Returns:
        The result of the conversion.
      • to_Resolution

        public static Resolution to_Resolution(float value)

        Performs an implicit conversion from float to Resolution.

        Parameters:
        value - The value treated as dpi.
        Returns:
        The result of the conversion.
      • op_Addition

        public static Resolution op_Addition(Resolution a,
                                             Resolution 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 Resolution op_Subtraction(Resolution a,
                                                Resolution 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(Resolution a,
                                          Resolution 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(Resolution a,
                                             Resolution 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(Resolution a,
                                                 Resolution 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(Resolution a,
                                                    Resolution 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(Resolution a,
                                          Resolution 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(Resolution a,
                                            Resolution b)

        Implements the operator !=.

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

        protected double onConvert(double value,
                                   UnitType fromType,
                                   UnitType toType)

        Called when unit is converted to the specified unit type.

        Specified by:
        onConvert in class Numeric
        Parameters:
        value - The value.
        fromType - From unit type.
        toType - To unit type.
        Returns:
        Returns value that is converted to specified type.