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

The QLine class provides a two-dimensional vector using integer precision. More...

Inheritance diagram for QtCore.QLine:
Collaboration diagram for QtCore.QLine:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QLine ()
 
 
 QLine (QLine copy)
 
 
 QLine (QPoint pt1, QPoint pt2)
 
 
 QLine (int x1, int y1, int x2, int y2)
 
 
virtual void CreateProxy ()
 
new int Dx ()
 
 
new int Dy ()
 
 
new bool IsNull ()
 
 
new void SetLine (int x1, int y1, int x2, int y2)
 
 
new void SetPoints (QPoint p1, QPoint p2)
 
 
new void Translate (QPoint p)
 
 
new void Translate (int dx, int dy)
 
 
new QLine Translated (QPoint p)
 
 
new QLine Translated (int dx, int dy)
 
 
new int X1 ()
 
 
new int X2 ()
 
 
new int Y1 ()
 
 
new int Y2 ()
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QLine arg1, QLine arg2)
 
 
static bool operator== (QLine arg1, QLine arg2)
 
 

Protected Member Functions

 QLine (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

new QPoint P1 [get, set]
 
 
new QPoint P2 [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QLine class provides a two-dimensional vector using integer precision.

A QLine describes a finite length line (or a line segment) on a two-dimensional surface. The start and end points of the line are specified using integer point accuracy for coordinates. Use the QLineF constructor to retrieve a floating point copy.

The positions of the line's start and end points can be retrieved using the p1(), x1(), y1(), p2(), x2(), and y2() functions. The dx() and dy() functions return the horizontal and vertical components of the line. Use isNull() to determine whether the QLine represents a valid line or a null line.

Finally, the line can be translated a given offset using the translate() function.

See also QLineF, QPolygon, and QRect.

Constructor & Destructor Documentation

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

Constructs a null line.

QtCore.QLine.QLine ( QLine  copy)

Constructs a null line.

QtCore.QLine.QLine ( QPoint  pt1,
QPoint  pt2 
)

Constructs a line object that represents the line between p1 and p2.

QtCore.QLine.QLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Constructs a line object that represents the line between (x1, y1) and (x2, y2).

Member Function Documentation

virtual void QtCore.QLine.CreateProxy ( )
virtual
new void QtCore.QLine.Dispose ( )
new int QtCore.QLine.Dx ( )

Returns the horizontal component of the line's vector.

See also dy().

new int QtCore.QLine.Dy ( )

Returns the vertical component of the line's vector.

See also dx().

override bool QtCore.QLine.Equals ( object  o)
override int QtCore.QLine.GetHashCode ( )
new bool QtCore.QLine.IsNull ( )

Returns true if the line is not set up with valid start and end point; otherwise returns false.

static bool QtCore.QLine.operator!= ( QLine  arg1,
QLine  arg2 
)
static

Returns true if the given line is not the same as this line.

A line is different from another line if any of their start or end points differ, or the internal order of the points is different.

static bool QtCore.QLine.operator== ( QLine  arg1,
QLine  arg2 
)
static

Returns true if the given line is the same as this line.

A line is identical to another line if the start and end points are identical, and the internal order of the points is the same.

new void QtCore.QLine.SetLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Sets this line to the start in x1, y1 and end in x2, y2.

This function was introduced in Qt 4.4.

See also setP1(), setP2(), p1(), and p2().

new void QtCore.QLine.SetPoints ( QPoint  p1,
QPoint  p2 
)

Sets the start point of this line to p1 and the end point of this line to p2.

This function was introduced in Qt 4.4.

See also setP1(), setP2(), p1(), and p2().

new void QtCore.QLine.Translate ( QPoint  p)

Translates this line by the given offset.

new void QtCore.QLine.Translate ( int  dx,
int  dy 
)

This is an overloaded function.

Translates this line the distance specified by dx and dy.

new QLine QtCore.QLine.Translated ( QPoint  p)

Returns this line translated by the given offset.

This function was introduced in Qt 4.4.

new QLine QtCore.QLine.Translated ( int  dx,
int  dy 
)

This is an overloaded function.

Returns this line translated the distance specified by dx and dy.

This function was introduced in Qt 4.4.

new int QtCore.QLine.X1 ( )

Returns the x-coordinate of the line's start point.

See also p1().

new int QtCore.QLine.X2 ( )

Returns the x-coordinate of the line's end point.

See also p2().

new int QtCore.QLine.Y1 ( )

Returns the y-coordinate of the line's start point.

See also p1().

new int QtCore.QLine.Y2 ( )

Returns the y-coordinate of the line's end point.

See also p2().

Member Data Documentation

SmokeInvocation QtCore.QLine.interceptor
protected

Property Documentation

new QPoint QtCore.QLine.P1
getset

Returns the line's start point.

Sets the starting point of this line to p1.

This function was introduced in Qt 4.4.

new QPoint QtCore.QLine.P2
getset

Returns the line's end point.

Sets the end point of this line to p2.

This function was introduced in Qt 4.4.

virtual System.IntPtr QtCore.QLine.SmokeObject
getset