Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtCore.QPointF Class Reference

The QPointF class defines a point in the plane using floating point precision. More...

Inheritance diagram for QtCore.QPointF:
Collaboration diagram for QtCore.QPointF:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QPointF ()
  More...
 
 QPointF (QPoint p)
  More...
 
 QPointF (QPointF copy)
 
 QPointF (double xpos, double ypos)
  More...
 
virtual void CreateProxy ()
 
new QPoint ToPoint ()
  More...
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QPointF p1, QPointF p2)
  More...
 
static QPointF operator* (QPointF p, double c)
  More...
 
static QPointF operator+ (QPointF p1, QPointF p2)
  More...
 
static QPointF operator- (QPointF p)
  More...
 
static QPointF operator- (QPointF p1, QPointF p2)
  More...
 
static QPointF operator/ (QPointF p, double c)
  More...
 
static bool operator== (QPointF p1, QPointF p2)
  More...
 

Protected Member Functions

 QPointF (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

double X [get, set]
  More...
 
double Y [get, set]
  More...
 
bool IsNull [get]
  More...
 
double ManhattanLength [get]
  More...
 
double Rx [get]
  More...
 
double Ry [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

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.

Constructor & Destructor Documentation

QtCore.QPointF.QPointF ( System.Type  dummy)
protected
QtCore.QPointF.QPointF ( )

Constructs a null point, i.e. with coordinates (0.0, 0.0)

See also isNull().

Here is the call graph for this function:

Here is the caller graph for this function:

QtCore.QPointF.QPointF ( QPoint  p)

Constructs a copy of the given point.

See also toPoint().

Here is the call graph for this function:

QtCore.QPointF.QPointF ( QPointF  copy)

Here is the call graph for this function:

QtCore.QPointF.QPointF ( double  xpos,
double  ypos 
)

Constructs a point with the given coordinates (x, y).

See also setX() and setY().

Here is the call graph for this function:

Member Function Documentation

virtual void QtCore.QPointF.CreateProxy ( )
virtual

Here is the caller graph for this function:

new void QtCore.QPointF.Dispose ( )
override bool QtCore.QPointF.Equals ( object  o)

Here is the call graph for this function:

override int QtCore.QPointF.GetHashCode ( )
static bool QtCore.QPointF.operator!= ( QPointF  p1,
QPointF  p2 
)
static

Returns true if p1 is not equal to p2; otherwise returns false.

static QPointF QtCore.QPointF.operator* ( QPointF  p,
double  c 
)
static

Returns a copy of the given point, multiplied by the given factor.

See also QPointF::operator*=().

static QPointF QtCore.QPointF.operator+ ( QPointF  p1,
QPointF  p2 
)
static

Returns a QPointF object that is the sum of the given points, p1 and p2; each component is added separately.

See also QPointF::operator+=().

static QPointF QtCore.QPointF.operator- ( QPointF  p)
static

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.

static QPointF QtCore.QPointF.operator- ( QPointF  p1,
QPointF  p2 
)
static

Returns a QPointF object that is formed by subtracting p2 from p1; each component is subtracted separately.

See also QPointF::operator-=().

static QPointF QtCore.QPointF.operator/ ( QPointF  p,
double  c 
)
static

Returns the QPointF object formed by dividing both components of the given point by the given divisor.

See also QPointF::operator/=().

static bool QtCore.QPointF.operator== ( QPointF  p1,
QPointF  p2 
)
static

Returns true if p1 is equal to p2; otherwise returns false.

new QPoint QtCore.QPointF.ToPoint ( )

Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rounded coordinates.

See also QPointF().

Member Data Documentation

SmokeInvocation QtCore.QPointF.interceptor
protected

Property Documentation

bool QtCore.QPointF.IsNull
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.

double QtCore.QPointF.ManhattanLength
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().

double QtCore.QPointF.Rx
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().

double QtCore.QPointF.Ry
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().

virtual System.IntPtr QtCore.QPointF.SmokeObject
getset
double QtCore.QPointF.X
getset

Returns the x-coordinate of this point.

Sets the x coordinate of this point to the given x coordinate.

double QtCore.QPointF.Y
getset

Returns the y-coordinate of this point.

Sets the y coordinate of this point to the given y coordinate.