Copypixels (Bitmapdata.copypixels Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

copyPixels (BitmapData.copyPixels method)

public copyPixels(sourceBitmap:BitmapData, sourceRect:Rectangle,
destPoint:Point, [alphaBitmap:BitmapData], [alphaPoint:Point],
[mergeAlpha:Boolean]) : Void
Provides a fast routine to perform pixel manipulation between images with no stretching,
rotation, or color effects. This method copies a rectangular area of a source image to a
rectangular area of the same size at the destination point of the destination BitmapData
object.
If include the
alphaBitmap
alpha source for the source image. If the source image has alpha data, both sets of alpha data
are used to composite pixels from the source image to the destination image. The
parameter is the point in the alpha image that corresponds to the upper-left corner of the
source rectangle. Any pixels outside the intersection of the source image and alpha image are
not copied to the destination image.
The
property controls whether or not the alpha channel is used when a
mergeAlpha
transparent image is copied onto another transparent image. To simply copy pixels (with no
alpha used), set the
mergeAlpha
destination. By default, the
Availability: ActionScript 1.0; Flash Player 8
Parameters
sourceBitmap:flash.display.BitmapData
pixels. The source image can be a different BitmapData instance, or it can refer to the current
BitmapData instance.
sourceRect:flash.geom.Rectangle
to use as input.
destPoint:flash.geom.Point
of the rectangular area where the new pixels are placed.
alphaBitmap:flash.display.BitmapData
object source.
alphaPoint:flash.geom.Point
source that corresponds to the upper-left corner of the
mergeAlpha:Boolean
. To copy pixels with no alpha channel, set the value to
true
and
alphaPoint
property to
property is
mergeAlpha
- A rectangle that defines the area of the source image
- The destination point, that represents the upper-left corner
[optional] - The point in the alpha BitmapData object
[optional] - A Boolean value:To use the alpha channel, set the value to
parameters, you can use a secondary image as an
. Then all pixels are copied from source to
false
.
true
- The input bitmap image from which to copy
[optional] - A secondary, alpha BitmapData
sourceRect
false
BitmapData (flash.display.BitmapData)
alphaPoint
parameter.
.
305

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents