Skip to content

Latest commit

 

History

History
62 lines (52 loc) · 1.31 KB

File metadata and controls

62 lines (52 loc) · 1.31 KB

GetPtL

Description

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

Parameters

Name Type Description
p1 REAL Coordinates of line start point.
p2 REAL Returns coordinates of mouse click.

Remarks

In Python this function will NOT block execution. It will execute a callback function with the resulted line (two points as callback function parameters).

Examples

VectorScript

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.

Python

See Also

VS Functions: GetPt | GetPtL | GetPt3D | GetPtL3D | GetLine | GetLine3D | GetRect | GetRect3D | TrackObject

Version

Availability: from All Versions

Category