<class name="QPointF" doc="/** <p>The <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> class defines a point in the plane using floating point precision.</p> <p>A point is specified by a x coordinate and an y coordinate which can be accessed using the <a href="QPointF.html#x()"><tt>x</tt></a> and <a href="QPointF.html#y()"><tt>y</tt></a> functions. The coordinates of the point are specified using floating point numbers for accuracy. The <a href="QPointF.html#isNull()"><tt>isNull</tt></a> function returns true if both x and y are set to 0.0&#x2e; The coordinates can be set (or altered) using the <a href="QPointF.html#setX(double)"><tt>setX</tt></a> and <a href="QPointF.html#setY(double)"><tt>setY</tt></a> functions, or alternatively the rx() and ry() functions which return references to the coordinates (allowing direct manipulation).</p> <p>Given a point <i>p</i>, the following statements are all equivalent:</p> <pre> QPointF p; p.setX(p.x() + 1.0); p += QPoint(1.0, 0.0); p.rx()++;</pre> <p>A <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> object can also be used as a vector: Addition and subtraction are defined as for vectors (each component is added separately). A <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> object can also be divided or multiplied by an <tt>int</tt> or a <tt>qreal</tt>.</p> <p>In addition, the <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> class provides a constructor converting a <a href="QPoint.html"><tt>QPoint</tt></a> object into a <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> object, and a corresponding <a href="QPointF.html#toPoint()"><tt>toPoint</tt></a> function which returns a <a href="QPoint.html"><tt>QPoint</tt></a> copy of <i>this</i> point. Finally, <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> objects can be streamed as well as compared.</p> @see <a href="QPoint.html"><tt>QPoint</tt></a> @see <a href="%2E%2E/gui/QPolygonF.html"><tt>QPolygonF</tt></a> */"> <method name="public QPointF(double xpos, double ypos)" doc="/** <p>Constructs a point with the given coordinates (<tt>xpos</tt>, <tt>ypos</tt>).</p> @see <a href="QPointF.html#setX(double)"><tt>setX</tt></a> @see <a href="QPointF.html#setY(double)"><tt>setY</tt></a> */"/> <method name="public QPointF()" doc="/** <p>Constructs a null point, i.e&#x2e; with coordinates (0.0, 0.0)</p> @see <a href="QPointF.html#isNull()"><tt>isNull</tt></a> */"/> <method name="public QPointF(com.trolltech.qt.core.QPoint p)" doc="/** <p>Constructs a copy of the given <tt>p</tt>.</p> @see <a href="QPointF.html#toPoint()"><tt>toPoint</tt></a> */"/> <method name="public final boolean isNull()" doc="/** <p>Returns true if both the x and y coordinates are set to 0.0, otherwise returns false.</p> */"/> <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/> <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/> <method name="public final void setX(double x)" doc="/** <p>Sets the x coordinate of this point to the given <tt>x</tt> coordinate.</p> @see <a href="QPointF.html#x()"><tt>x</tt></a> @see <a href="QPointF.html#setY(double)"><tt>setY</tt></a> */"/> <method name="public final void setY(double y)" doc="/** <p>Sets the y coordinate of this point to the given <tt>y</tt> coordinate.</p> @see <a href="QPointF.html#y()"><tt>y</tt></a> @see <a href="QPointF.html#setX(double)"><tt>setX</tt></a> */"/> <method name="public final com.trolltech.qt.core.QPoint toPoint()" doc="/** <p>Rounds the coordinates of this point to the nearest integer, and returns a <a href="QPoint.html"><tt>QPoint</tt></a> object with the rounded coordinates.</p> @see <a href="QPointF.html#QPointF(com.trolltech.qt.core.QPoint)"><tt>QPointF</tt></a> */"/> <method name="public final double x()" doc="/** <p>Returns the x-coordinate of this point.</p> @see <a href="QPointF.html#setX(double)"><tt>setX</tt></a> @see <tt>rx</tt> */"/> <method name="public final double y()" doc="/** <p>Returns the y-coordinate of this point.</p> @see <a href="QPointF.html#setY(double)"><tt>setY</tt></a> @see <tt>ry</tt> */"/> </class>