Inflatepoint (Rectangle.inflatepoint Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

See also
x (Rectangle.x property)

inflatePoint (Rectangle.inflatePoint method)

public inflatePoint(pt:Point) : Void
Increases the size of the Rectangle object. This method is similar to the
Rectangle.inflate()
The following two code examples give the same result:
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)
Availability: ActionScript 1.0; Flash Player 8
Parameters
pt:flash.geom.Point
Example
The following example creates a Rectangle object and inflates it by the x (horizontal) and y
(vertical) amounts found in a point.
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)
See also
Point (flash.geom.Point)
1042
ActionScript classes
,
y (Rectangle.y property)
method, except that it takes a Point object as a parameter.
- Increases the rectangle by the x and y coordinate values of the point.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents