VS:PtInPoly/ja

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

ハンドルで指定した多角形/曲線の内側に、指定した座標が入っていればTRUEを返します。

FUNCTION PtInPoly(
p :REAL;
h :HANDLE) : BOOLEAN;
def vs.PtInPoly(p, h):
    return BOOLEAN

Parameters

p REAL 座標
h HANDLE 多角形/曲線のハンドル

Return Value

判定(入っていればTRUE)

Example

PROCEDURE Example;
VAR
	polyHandle :HANDLE;
	locusHandle :HANDLE;
	x, y :REAL;
BEGIN
	CallTool(-204); polyHandle := FSActLayer;
	CallTool(-221); locusHandle := FSActLayer;
	GetLocPt(locusHandle, x, y);
	Message(PtInPoly(x, y, polyHandle));
END;
RUN(Example);

Version

利用可能バージョン: MiniCAD