Qyoto
4.0.6
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 QPoint | ToPoint () |
| |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QPointF p1, QPointF p2) |
| |
static QPointF | operator* (QPointF p, double c) |
| |
static QPointF | operator+ (QPointF p1, QPointF p2) |
| |
static QPointF | operator- (QPointF p) |
| |
static QPointF | operator- (QPointF p1, QPointF p2) |
| |
static QPointF | operator/ (QPointF p, double c) |
| |
static bool | operator== (QPointF p1, QPointF p2) |
| |
Protected Member Functions | |
QPointF (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
double | X [get, set] |
| |
double | Y [get, set] |
| |
bool | IsNull [get] |
| |
double | ManhattanLength [get] |
| |
double | Rx [get] |
| |
double | Ry [get] |
| |
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 | ) |
QtCore.QPointF.QPointF | ( | double | xpos, |
double | ypos | ||
) |
Constructs a point with the given coordinates (x, y).
See also setX() and setY().
|
virtual |
new void QtCore.QPointF.Dispose | ( | ) |
override bool QtCore.QPointF.Equals | ( | object | o | ) |
override int QtCore.QPointF.GetHashCode | ( | ) |
Returns true if p1 is not equal to p2; otherwise returns false.
Returns a copy of the given point, multiplied by the given factor.
See also QPointF::operator*=().
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/=().
Returns true if p1 is equal to p2; otherwise returns false.
new QPoint QtCore.QPointF.ToPoint | ( | ) |
|
protected |
|
get |
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.
|
get |
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().
|
get |
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().
|
get |
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().
|
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.