Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QPointF class defines a point in the plane using floating point precision. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QPointF () | |
| |
QPointF (QPoint p) | |
| |
QPointF (QPointF copy) | |
| |
QPointF (double xpos, double ypos) | |
| |
virtual void | CreateProxy () |
new bool | IsNull () |
| |
new double | ManhattanLength () |
| |
new double | Rx () |
| |
new double | Ry () |
| |
new QPoint | ToPoint () |
| |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QPointF arg1, QPointF arg2) |
static QPointF | operator* (QPointF arg1, double arg2) |
| |
static QPointF | operator+ (QPointF arg1, QPointF arg2) |
| |
static QPointF | operator- (QPointF arg1) |
| |
static QPointF | operator- (QPointF arg1, QPointF arg2) |
| |
static QPointF | operator/ (QPointF arg1, double arg2) |
| |
static bool | operator== (QPointF arg1, QPointF arg2) |
Protected Member Functions | |
QPointF (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new double | X [get, set] |
| |
new double | Y [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
The QPointF class defines a point in the plane using floating point precision.
A point is specified by a x coordinate and an y coordinate which can be accessed using the x() and y() functions. The coordinates of the point are specified using floating point numbers for accuracy. The isNull() function returns true if both x and y are set to 0.0. The coordinates can be set (or altered) using the setX() and setY() functions, or alternatively the rx() and ry() functions which return references to the coordinates (allowing direct manipulation).
Given a point p, the following statements are all equivalent:
QPointF p;
p.setX(p.x() + 1.0);
p += QPointF(1.0, 0.0);
p.rx()++;
A QPointF object can also be used as a vector: Addition and subtraction are defined as for vectors (each component is added separately). A QPointF object can also be divided or multiplied by an int or a qreal.
In addition, the QPointF class provides a constructor converting a QPoint object into a QPointF object, and a corresponding toPoint() function which returns a QPoint copy of this point. Finally, QPointF objects can be streamed as well as compared.
See also QPoint and QPolygonF.
|
protected |
QtCore.QPointF.QPointF | ( | ) |
Constructs a null point, i.e. with coordinates (0.0, 0.0)
See also isNull().
QtCore.QPointF.QPointF | ( | QPoint | p | ) |
Constructs a copy of the given point.
See also toPoint().
QtCore.QPointF.QPointF | ( | QPointF | copy | ) |
Constructs a null point, i.e. with coordinates (0.0, 0.0)
See also isNull().
QtCore.QPointF.QPointF | ( | double | xpos, |
double | ypos | ||
) |
Constructs a null point, i.e. with coordinates (0.0, 0.0)
See also isNull().
|
virtual |
new void QtCore.QPointF.Dispose | ( | ) |
override bool QtCore.QPointF.Equals | ( | object | o | ) |
override int QtCore.QPointF.GetHashCode | ( | ) |
new bool QtCore.QPointF.IsNull | ( | ) |
Returns true if both the x and y coordinates are set to +0.0; otherwise returns false.
Note: Since this function treats +0.0 and -0.0 differently, points with zero-valued coordinates where either or both values have a negative sign are not defined to be null points.
new double QtCore.QPointF.ManhattanLength | ( | ) |
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" of the vector from the origin to the point.
This function was introduced in Qt 4.6.
See also QPoint::manhattanLength().
This is an overloaded function.
Returns a copy of the given point, multiplied by the given factor.
Returns a QPointF object that is the sum of the given points, p1 and p2; each component is added separately.
See also QPointF::operator+=().
This is an overloaded function.
Returns a QPointF object that is formed by changing the sign of both components of the given point.
Equivalent to QPointF(0,0) - point.
Returns a QPointF object that is formed by subtracting p2 from p1; each component is subtracted separately.
See also QPointF::operator-=().
Returns the QPointF object formed by dividing both components of the given point by the given divisor.
See also QPointF::operator/=().
new double QtCore.QPointF.Rx | ( | ) |
Returns a reference to the x coordinate of this point.
Using a reference makes it possible to directly manipulate x. For example:
QPointF p(1.1, 2.5);
p.rx()–; // p becomes (0.1, 2.5)
See also x() and setX().
new double QtCore.QPointF.Ry | ( | ) |
Returns a reference to the y coordinate of this point.
Using a reference makes it possible to directly manipulate y. For example:
QPointF p(1.1, 2.5);
p.ry()++; // p becomes (1.1, 3.5)
See also y() and setY().
new QPoint QtCore.QPointF.ToPoint | ( | ) |
|
protected |
|
getset |
|
getset |
Returns the x-coordinate of this point.
Sets the x coordinate of this point to the given x coordinate.
|
getset |
Returns the y-coordinate of this point.
Sets the y coordinate of this point to the given y coordinate.