com.aspose.html.drawing

Class Dimension

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Unit>
    Direct Known Subclasses:
    Angle, Frequency, Length, Resolution, Time


    public abstract class Dimension
    extends Numeric

    Provides the base class for dimensions. The general term 'dimension' refers to a number with a unit attached to it, and are denoted by UnitType.

    See Also:
    Unit
    • Constructor Detail

      • Dimension

        public Dimension(double value,
                         UnitType type)

        Initializes a new instance of the Dimension class.

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

        public Dimension(Numeric.NumericInit data)

        Initializes a new instance of the Dimension class.

        Parameters:
        data - The initialization data.
    • Method Detail

      • toString

        public String toString()

        Returns a System.String that represents this instance.

        Overrides:
        toString in class Numeric
        Returns:
        A System.String that represents this instance.
      • toString

        public String toString(UnitType unitType)

        Returns a System.String that represents this instance in the spicified units.

        Parameters:
        unitType - The unit type.
        Returns:
        A System.String that represents this instance.