The QTPlgLine class lets you deal with the coordinates of a line in a bi–dimensional space. No assumption is done about the orientation of the reference system.
Since version 6.7 of the plugin this class can be used in Console Applications
The QTPlgLine class constructors are called when you create a new instance of the class, while the ˜QTPlgPoint class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. A QTPlgLine object is valid if it defines a valid line.
The class provides you with the following initializer methods:
()
This is the default constructor. All of the class properties are set to 0
(other as QTPlgLine)
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
(p1 as ,
p2 as )
the coordinates of the line are initialized to the values of the
and
properties of the p1 and p2 points
specifies the position of the start of the line in respect to the origin of the reference system. As this property returns
a reference to the class instance, you can modify the coordinates
of the point by changing its
and properties
specifies the position of the end of the line in respect to the origin of the reference system. As this property returns
a reference to the class instance, you can modify the coordinates
of the point by changing its
and properties
specifies the coordinates of the baricenter of the line
specifies the length (in pixel) of the line