inflatePoint (Rectangle.inflatePoint メソッド)

public inflatePoint(pt: Point ) : Void

Rectangle オブジェクトのサイズを大きくします。このメソッドは、Point オブジェクトをパラメータとして使用することを除けば、Rectangle.inflate() メソッドと似ています。

次の 2 つのコード例の結果は同じになります。

rect1 = new flash.geom.Rectangle(0,0,2,5);
rect1.inflate(2,2)
rect1 = new flash.geom.Rectangle(0,0,2,5);
pt1 = new flash.geom.Point(2,2);
rect1.inflatePoint(pt1)

対応バージョン : ActionScript 1.0、Flash Player 8

パラメータ

pt:Point - 矩形をポイントの x 座標値と y 座標値だけ大きくします。

次の例では、Rectangle オブジェクトを作成し、ポイントで見つかった x (水平) と y (垂直) の量だけ膨張させます。

import flash.geom.Rectangle;
import flash.geom.Point;

var rect:Rectangle = new Rectangle(0, 0, 2, 5);
trace(rect.toString()); // (x=0, y=0, w=2, h=5

var myPoint:Point = new Point(2, 2);
rect.inflatePoint(myPoint);
trace(rect.toString()); // (x=-2, y=-2, w=6, h=9)

関連項目

Point (flash.geom.Point)


 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flash/9.0_jp/main/00002085.html