VS:GetPtL: Difference between revisions
m (1 revision) |
No edit summary |
||
Line 13: | Line 13: | ||
</funcDef> | </funcDef> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
def vs.GetPtL( | def vs.GetPtL(callback): | ||
return | return None | ||
</funcDef> | </funcDef> | ||
</def> | </def> | ||
Line 33: | Line 33: | ||
</lineList> | </lineList> | ||
</params> | </params> | ||
----------------------------------------------------------------------------------------------------------- | |||
<remark> | |||
In Python this function will <b>NOT</b> block execution. It will execute a callback function with the resulted line (two points as callback function parameters). | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample> | <sample> | ||
==== VectorScript ==== | |||
<code lang="pas"> | <code lang="pas"> | ||
PROCEDURE Example; | PROCEDURE Example; | ||
Line 47: | Line 53: | ||
END; | END; | ||
RUN(Example);</code> | RUN(Example);</code> | ||
Python sample is similar to the sample in [[VS:GetPt]]. | |||
==== Python ==== | |||
<code lang="py"> | |||
</code> | |||
</sample> | </sample> | ||
Latest revision as of 19:20, 20 December 2013
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
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
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).
Example
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 VS:GetPt.
Python
Version
Availability: from All Versions
See Also
VS Functions:
VS:GetPt | VS:GetPtL | VS:GetPt3D | VS:GetPtL3D | VS:GetLine | VS:GetLine3D | VS:GetRect | VS:GetRect3D | VS:TrackObject
[[VS:GetPt]] | [[VS:GetPtL]] | [[VS:GetPt3D]] | [[VS:GetPtL3D]] | [[VS:GetLine]] | [[VS:GetLine3D]] | [[VS:GetRect]] | [[VS:GetRect3D]] |
[[VS:TrackObject]]