VS:PtInRect/ja

From Vectorworks Developer
Revision as of 14:36, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Description

指定した四角形の座標の内側に、指定した座標が入っていればTRUEを返します。

FUNCTION PtInRect(
point :REAL;
rect1 :REAL;
rect2 :REAL) : BOOLEAN;
def vs.PtInRect(point, rect1, rect2):
    return BOOLEAN

Parameters

point REAL 座標
rect1 REAL 四角形の左上の座標
rect2 REAL 四角形の右下の座標

Return Value

判定(入っていればTRUE)

Example

PROCEDURE Example;
VAR
	pointX, pointY, rect1X, rect1Y, rect2X, rect2Y :REAL;
BEGIN
	pointX := 1;
	pointY := 1;
	rect1X := 0;
	rect1Y := 2;
	rect2X := 2;
	rect2Y := 0;
	Message(PtInRect(pointX, pointY, rect1X, rect1Y, rect2X, rect2Y));
END;
RUN(Example);

Version

利用可能バージョン: MiniCAD