Packages

 

com.aspose.cad

Class PointF



  • public class PointF
    extends com.aspose.ms.lang.Struct<PointF>

    Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

    • Constructor Summary

      Constructors 
      Constructor and Description
      PointF() 
      PointF(float x, float y)
      Initializes a new instance of the Aspose.Imaging.PointF structure with the specified coordinates.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static PointF add(PointF point, Size size)
      Translates a given Aspose.Imaging.PointF by the specified Aspose.Imaging.Size.
      static PointF add(PointF point, SizeF size)
      Translates a given Aspose.Imaging.PointF by a specified Aspose.Imaging.SizeF.
      Object clone() 
      PointF Clone() 
      void CloneTo(PointF that) 
      boolean equals(Object obj)
      Specifies whether this Aspose.Imaging.PointF contains the same coordinates as the specified System.Object.
      static PointF getEmpty()
      Gets a new instance of the Aspose.Imaging.PointF structure that has Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values set to zero.
      float getX()
      Gets or sets the x-coordinate of this Aspose.Imaging.PointF.
      float getY()
      Gets or sets the y-coordinate of this Aspose.Imaging.PointF.
      int hashCode()
      Returns a hash code for this Aspose.Imaging.PointF structure.
      boolean isEmpty()
      Gets a value indicating whether this Aspose.Imaging.PointF is empty.
      static PointF op_Addition(PointF point, Size size)
      Translates a Aspose.Imaging.PointF by a given Aspose.Imaging.Size.
      static PointF op_Addition(PointF point, SizeF size)
      Translates the Aspose.Imaging.PointF by the specified Aspose.Imaging.SizeF.
      static boolean op_Equality(PointF point1, PointF point2)
      Compares two Aspose.Imaging.PointF structures.
      static boolean op_Inequality(PointF point1, PointF point2)
      Determines whether the coordinates of the specified points are not equal.
      static PointF op_Subtraction(PointF point, Size size)
      Translates a Aspose.Imaging.PointF by the negative of a given Aspose.Imaging.Size.
      static PointF op_Subtraction(PointF point, SizeF size)
      Translates a Aspose.Imaging.PointF by the negative of a specified Aspose.Imaging.SizeF.
      void setX(float value)
      Gets or sets the x-coordinate of this Aspose.Imaging.PointF.
      void setY(float value)
      Gets or sets the y-coordinate of this Aspose.Imaging.PointF.
      static PointF subtract(PointF point, Size size)
      Translates a Aspose.Imaging.PointF by the negative of a specified size.
      static PointF subtract(PointF point, SizeF size)
      Translates a Aspose.Imaging.PointF by the negative of a specified size.
      String toString()
      Converts this Aspose.Imaging.PointF to a human readable string.
    • Constructor Detail

      • PointF

        public PointF()
      • PointF

        public PointF(float x,
                      float y)

        Initializes a new instance of the Aspose.Imaging.PointF structure with the specified coordinates.

        Parameters:
        x - The horizontal position of the point.
        y - The vertical position of the point.
    • Method Detail

      • getEmpty

        public static PointF getEmpty()

        Gets a new instance of the Aspose.Imaging.PointF structure that has Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values set to zero.

      • isEmpty

        public boolean isEmpty()

        Gets a value indicating whether this Aspose.Imaging.PointF is empty.

        Value: True if both Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y are 0; otherwise, false.
      • getX

        public float getX()

        Gets or sets the x-coordinate of this Aspose.Imaging.PointF.

      • setX

        public void setX(float value)

        Gets or sets the x-coordinate of this Aspose.Imaging.PointF.

      • getY

        public float getY()

        Gets or sets the y-coordinate of this Aspose.Imaging.PointF.

      • setY

        public void setY(float value)

        Gets or sets the y-coordinate of this Aspose.Imaging.PointF.

      • op_Addition

        public static PointF op_Addition(PointF point,
                                         Size size)

        Translates a Aspose.Imaging.PointF by a given Aspose.Imaging.Size.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - A Aspose.Imaging.Size that specifies the pair of numbers to add to the coordinates of point.
        Returns:
        Returns the translated Aspose.Imaging.PointF.
      • op_Subtraction

        public static PointF op_Subtraction(PointF point,
                                            Size size)

        Translates a Aspose.Imaging.PointF by the negative of a given Aspose.Imaging.Size.

        Parameters:
        point - A Aspose.Imaging.PointF to translate.
        size - A Aspose.Imaging.Size that specifies the numbers to subtract from the x- and y-coordinates of the point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • op_Addition

        public static PointF op_Addition(PointF point,
                                         SizeF size)

        Translates the Aspose.Imaging.PointF by the specified Aspose.Imaging.SizeF.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.SizeF that specifies the numbers to add to the x- and y-coordinates of the point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • op_Subtraction

        public static PointF op_Subtraction(PointF point,
                                            SizeF size)

        Translates a Aspose.Imaging.PointF by the negative of a specified Aspose.Imaging.SizeF.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.SizeF that specifies the numbers to subtract from the coordinates of point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • op_Equality

        public static boolean op_Equality(PointF point1,
                                          PointF point2)

        Compares two Aspose.Imaging.PointF structures. The result specifies whether the values of the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y properties of the two Aspose.Imaging.PointF structures are equal.

        Parameters:
        point1 - A first Aspose.Imaging.PointF to compare.
        point2 - A second Aspose.Imaging.PointF to compare.
        Returns:
        True if the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values of the first and second Aspose.Imaging.PointF structures are equal; otherwise, false.
      • op_Inequality

        public static boolean op_Inequality(PointF point1,
                                            PointF point2)

        Determines whether the coordinates of the specified points are not equal.

        Parameters:
        point1 - A first Aspose.Imaging.PointF to compare.
        point2 - A second Aspose.Imaging.PointF to compare.
        Returns:
        True to indicate the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values of point1 and point2 are not equal; otherwise, false.
      • add

        public static PointF add(PointF point,
                                 Size size)

        Translates a given Aspose.Imaging.PointF by the specified Aspose.Imaging.Size.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.Size that specifies the numbers to add to the coordinates of point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • subtract

        public static PointF subtract(PointF point,
                                      Size size)

        Translates a Aspose.Imaging.PointF by the negative of a specified size.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.Size that specifies the numbers to subtract from the coordinates of point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • add

        public static PointF add(PointF point,
                                 SizeF size)

        Translates a given Aspose.Imaging.PointF by a specified Aspose.Imaging.SizeF.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.SizeF that specifies the numbers to add to the coordinates of point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • subtract

        public static PointF subtract(PointF point,
                                      SizeF size)

        Translates a Aspose.Imaging.PointF by the negative of a specified size.

        Parameters:
        point - The Aspose.Imaging.PointF to translate.
        size - The Aspose.Imaging.SizeF that specifies the numbers to subtract from the coordinates of point.
        Returns:
        The translated Aspose.Imaging.PointF.
      • equals

        public boolean equals(Object obj)

        Specifies whether this Aspose.Imaging.PointF contains the same coordinates as the specified System.Object.

        Overrides:
        equals in class Object
        Parameters:
        obj - The System.Object to test.
        Returns:
        This method returns true if obj is a Aspose.Imaging.PointF and has the same coordinates as this Aspose.Imaging.Point.
      • hashCode

        public int hashCode()

        Returns a hash code for this Aspose.Imaging.PointF structure.

        Overrides:
        hashCode in class Object
        Returns:
        An integer value that specifies a hash value for this Aspose.Imaging.PointF structure.
      • toString

        public String toString()

        Converts this Aspose.Imaging.PointF to a human readable string.

        Overrides:
        toString in class Object
        Returns:
        A string that represents this Aspose.Imaging.PointF.
      • CloneTo

        public void CloneTo(PointF that)
        Specified by:
        CloneTo in class com.aspose.ms.System.ValueType<PointF>
      • Clone

        public PointF Clone()
        Specified by:
        Clone in class com.aspose.ms.System.ValueType<PointF>