Procedure GetPtL creates a temporary "rubberband" line from a specified point to the user selected end point. This cannot be used if there is a function anywhere in the calling chain.
PROCEDURE GetPtL(
p1X,p2Y : REAL;
VAR p2X,p2Y : REAL);def vs.GetPtL(callback):
return None| Name | Type | Description |
|---|---|---|
| p1 | REAL | Coordinates of line start point. |
| p2 | REAL | Returns coordinates of mouse click. |
In Python this function will NOT block execution. It will execute a callback function with the resulted line (two points as callback function parameters).
PROCEDURE Example;
VAR
pt1, pt2 :VECTOR;
BEGIN
GetPt(pt1.x, pt1.y);
GetPtL(pt1.x, pt1.y, pt2.x, pt2.y);
MoveTo(pt1.x, pt1.y);
LineTo(pt2.x, pt2.y);
END;
RUN(Example);Python sample is similar to the sample in GetPt.
VS Functions: GetPt | GetPtL | GetPt3D | GetPtL3D | GetLine | GetLine3D | GetRect | GetRect3D | TrackObject
Availability: from All Versions