Generatefilterrect (Bitmapdata.generatefilterrect Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

generateFilterRect (BitmapData.generateFilterRect
method)
public generateFilterRect(sourceRect:Rectangle, filter:BitmapFilter) :
Rectangle
Determines the destination rectangle that the
BitmapData object, a source rectangle, and a filter object.
For example, a blur filter normally affects an area larger than the size of the original image. A
100 x 200 pixel image that is being filtered by a default BlurFilter instance, where
generates a destination rectangle of
blurY = 4
generateFilterRect()
advance so that you can size the destination image appropriately before performing a filter
operation.
Some filters clip their destination rectangle based on the source image size. For example, an
inner
does not generate a larger result than its source image. In this API, the
DropShadow
BitmapData object is used as the source bounds and not the source
Availability: ActionScript 1.0; Flash Player 8
Parameters
sourceRect:flash.geom.Rectangle
use as input.
filter:flash.filters.BitmapFilter
destination rectangle.
Returns
flash.geom.Rectangle
parameter, and a filter.
sourceRect
Example
The following example shows how to determine the destination rectangle that the
method affects:
applyfilter()
import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.geom.Rectangle;
var myBitmapData:BitmapData = new BitmapData(100, 80, true, 0xCCCCCCCC);
var filter:BevelFilter = new BevelFilter(5, 45, 0xFFFF00, .8, 0x0000FF, .8,
20, 20, 1, 3, "outter", false);
applyFilter()
method lets you find out the size of this destination rectangle in
- A rectangle defining the area of the source image to
- A filter object that you use to calculate the
- A destination rectangle computed by using an image, the
method call affects, given a
. The
(-2,-2,104,204)
rect
BitmapData (flash.display.BitmapData)
blurX =
parameter.
311

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF