// >> height: 80
// >> width: 100
}
To further demonstrate the relationships between
the following example modifies the pixel value at (1, 1) of
(1, 1) demonstrates that the
instance instead instead of refering to the values.
bitmap_1
import flash.display.BitmapData;
var bitmap_1:BitmapData = new BitmapData(100, 80, false, 0x000000);
var bitmap_2:BitmapData = bitmap_1;
var clonedBitmap:BitmapData = bitmap_1.clone();
trace(bitmap_1.getPixel32(1, 1)); // -16777216
trace(bitmap_2.getPixel32(1, 1)); // -16777216
trace(clonedBitmap.getPixel32(1, 1)); // -16777216
bitmap_1.setPixel32(1, 1, 0xFFFFFF);
trace(bitmap_1.getPixel32(1, 1)); // -1
trace(bitmap_2.getPixel32(1, 1)); // -1
trace(clonedBitmap.getPixel32(1, 1)); // -16777216
colorTransform (BitmapData.colorTransform
method)
public colorTransform(rect:Rectangle, colorTransform:ColorTransform) : Void
Adjusts the color values in a specified area of a bitmap image by using a ColorTransform
object. If the rectangle matches the boundaries of the bitmap image, this method transforms
the color values of the entire image.
Availability: ActionScript 1.0; Flash Player 8
Parameters
rect:flash.geom.Rectangle
which the ColorTransform object is applied.
colorTransform:flash.geom.ColorTransform
the color transformation values to apply.
302
ActionScript classes
method creates an instance based on values of the
clone()
- A Rectangle object that defines the area of the image in
,
bitmap_1
bitmap_2
. Modifying pixel value at
bitmap_1
- A ColorTransform object that describes
, and
clonedBitmap
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?