| Package | graphics.display |
| Class | public class BigBitmap |
| Inheritance | BigBitmap flash.display.Sprite |
| Implements | Lockable |
| Method | Defined By | ||
|---|---|---|---|
BigBitmap(width:Number = 0, height:Number = 0, transparent:Boolean = true, color:uint = 0xFFFFFFFF)
Creates a new BigBitmap instance. | BigBitmap | ||
dispose():void
Frees memory that is used to store the BitmapData object. | BigBitmap | ||
draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void
Draws the source display object onto the bitmap image, using the Flash Player or AIR vector renderer. | BigBitmap | ||
fillRect(rect:Rectangle, color:uint):void
Fills a rectangular area of pixels with a specified ARGB color. | BigBitmap | ||
getPixel(x:Number, y:Number):uint
Returns an integer that represents an RGB pixel value from a BitmapData object at a specific point (x, y). | BigBitmap | ||
getPixel32(x:Number, y:Number):uint
Returns an ARGB color value that contains alpha channel data and RGB data. | BigBitmap | ||
isLocked():Boolean
Returns true if the object is locked. | BigBitmap | ||
lock():void
Locks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are not updated when this BitmapData object changes. | BigBitmap | ||
noise(randomSeed:int, low:uint = 0, high:uint = 255, channelOptions:uint = 7, grayScale:Boolean = false):void
Fills an image with pixels representing random noise. | BigBitmap | ||
perlinNoise(baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean = false, fractalNoise:Boolean = true, channelOptions:uint = 7, grayScale:Boolean = false):void
Generates a Perlin noise image. | BigBitmap | ||
setBitmap(width:Number, height:Number, transparent:Boolean = false, color:uint = 0xFFFFFFFF):void
Sets all new components of the bitmap and before dispose it. | BigBitmap | ||
setPixel(x:Number, y:Number, color:uint):void
Sets a single pixel of a BitmapData object. | BigBitmap | ||
setPixel32(x:Number, y:Number, color:uint):void
ets the color and alpha transparency values of a single pixel of a BitmapData object. | BigBitmap | ||
unlock():void
Unlocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are updated when this BitmapData object changes. | BigBitmap | ||
| BigBitmap | () | Constructor |
public function BigBitmap(width:Number = 0, height:Number = 0, transparent:Boolean = true, color:uint = 0xFFFFFFFF)Creates a new BigBitmap instance.
Parameterswidth:Number (default = 0) — The width of the bitmap image in pixels.
| |
height:Number (default = 0) — The height of the bitmap image in pixels.
| |
transparent:Boolean (default = true) — Specifies whether the bitmap image supports per-pixel transparency. The default value is true (transparent). To create a fully transparent bitmap, set the value of the transparent parameter to true and the value of the fillColor parameter to 0x00000000 (or to 0). Setting the transparent property to false can result in minor improvements in rendering performance.
| |
color:uint (default = 0xFFFFFFFF) — A 32-bit ARGB color value that you use to fill the bitmap image area. The default value is 0xFFFFFFFF (solid white).
|
| dispose | () | method |
public function dispose():voidFrees memory that is used to store the BitmapData object.
| draw | () | method |
public function draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):voidDraws the source display object onto the bitmap image, using the Flash Player or AIR vector renderer.
Parameters
source:IBitmapDrawable — The display object or BitmapData object to draw to the BitmapData object. (The DisplayObject and BitmapData classes implement the IBitmapDrawable interface.)
| |
matrix:Matrix (default = null) — A Matrix object used to scale, rotate, or translate the coordinates of the bitmap. If you do not want to apply a matrix transformation to the image, set this parameter to an identity matrix, created with the default new Matrix() constructor, or pass a null value.
| |
colorTransform:ColorTransform (default = null) — A ColorTransform object that you use to adjust the color values of the bitmap. If no object is supplied, the bitmap image's colors are not transformed. If you must pass this parameter but you do not want to transform the image, set this parameter to a ColorTransform object created with the default new ColorTransform() constructor.
| |
blendMode:String (default = null) — A string value, from the flash.display.BlendMode class, specifying the blend mode to be applied to the resulting bitmap.
| |
clipRect:Rectangle (default = null) — A Rectangle object that defines the area of the source object to draw. If you do not supply this value, no clipping occurs and the entire source object is drawn.
| |
smoothing:Boolean (default = false) — A Boolean value that determines whether a BitmapData object is smoothed when scaled or rotated, due to a scaling or rotation in the matrix parameter. The smoothing parameter only applies if the source parameter is a BitmapData object. With smoothing set to false, the rotated or scaled BitmapData image can appear pixelated or jagged. For example, the following two images use the same BitmapData object for the source parameter, but the smoothing parameter is set to true on the left and false on the right:
|
| fillRect | () | method |
public function fillRect(rect:Rectangle, color:uint):voidFills a rectangular area of pixels with a specified ARGB color.
Parameters
rect:Rectangle — The rectangular area to fill.
| |
color:uint — The ARGB color value that fills the area. ARGB colors are often specified in hexadecimal format; for example, 0xFF336699.
|
| getPixel | () | method |
public function getPixel(x:Number, y:Number):uintReturns an integer that represents an RGB pixel value from a BitmapData object at a specific point (x, y). The getPixel() method returns an unmultiplied pixel value. No alpha information is returned.
Parameters
x:Number — The x position of the pixel.
| |
y:Number — The y position of the pixel.
|
uint — A number that represents a RGB pixel value. If the (x, y) coordinates are outside the bounds of the image, the method returns 0.
|
| getPixel32 | () | method |
public function getPixel32(x:Number, y:Number):uintReturns an ARGB color value that contains alpha channel data and RGB data. This method is similar to the getPixel() method, which returns an RGB color without alpha channel data.
Parameters
x:Number — The x position of the pixel.
| |
y:Number — The y position of the pixel.
|
uint — A number that represents an ARGB pixel value. If the (x, y) coordinates are outside the bounds of the image, the method returns 0.
|
| isLocked | () | method |
public function isLocked():Boolean
Returns true if the object is locked.
Boolean — true if the object is locked.
|
| lock | () | method |
public function lock():voidLocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are not updated when this BitmapData object changes. To improve performance, use this method along with the unlock() method before and after numerous calls to the setPixel() or setPixel32() method.
| noise | () | method |
public function noise(randomSeed:int, low:uint = 0, high:uint = 255, channelOptions:uint = 7, grayScale:Boolean = false):voidFills an image with pixels representing random noise.
Parameters
randomSeed:int — The random seed number to use. If you keep all other parameters the same, you can generate different pseudo-random results by varying the random seed value. The noise function is a mapping function, not a true random-number generation function, so it creates the same results each time from the same random seed.
| |
low:uint (default = 0) — The lowest value to generate for each channel (0 to 255).
| |
high:uint (default = 255) — The highest value to generate for each channel (0 to 255).
| |
channelOptions:uint (default = 7) — A number that can be a combination of any of the four color channel values (BitmapDataChannel.RED, BitmapDataChannel.BLUE, BitmapDataChannel.GREEN, and BitmapDataChannel.ALPHA). You can use the logical OR operator (|) to combine channel values.
| |
grayScale:Boolean (default = false) — A Boolean value. If the value is true, a grayscale image is created by setting all of the color channels to the same value. The alpha channel selection is not affected by setting this parameter to true.
|
| perlinNoise | () | method |
public function perlinNoise(baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean = false, fractalNoise:Boolean = true, channelOptions:uint = 7, grayScale:Boolean = false):voidGenerates a Perlin noise image. The Perlin noise generation algorithm interpolates and combines individual random noise functions (called octaves) into a single function that generates more natural-seeming random noise. Like musical octaves, each octave function is twice the frequency of the one before it. Perlin noise has been described as a "fractal sum of noise" because it combines multiple sets of noise data with different levels of detail. You can use Perlin noise functions to simulate natural phenomena and landscapes, such as wood grain, clouds, and mountain ranges. In most cases, the output of a Perlin noise function is not displayed directly but is used to enhance other images and give them pseudo-random variations.
Note : The Perlin noise algorithm is named for Ken Perlin, who developed it after generating computer graphics for the 1982 film Tron. Perlin received an Academy Award for Technical Achievement for the Perlin noise function in 1997.
Parameters
baseX:Number — Frequency to use in the x direction. For example, to generate a noise that is sized for a 64 x 128 image, pass 64 for the baseX value.
| |
baseY:Number — Frequency to use in the y direction. For example, to generate a noise that is sized for a 64 x 128 image, pass 128 for the baseY value.
| |
numOctaves:uint — Number of octaves or individual noise functions to combine to create this noise. Larger numbers of octaves create images with greater detail. Larger numbers of octaves also require more processing time.
| |
randomSeed:int — The random seed number to use. If you keep all other parameters the same, you can generate different pseudo-random results by varying the random seed value. The Perlin noise function is a mapping function, not a true random-number generation function, so it creates the same results each time from the same random seed.
| |
stitch:Boolean (default = false) — A Boolean value. If the value is true, the method attempts to smooth the transition edges of the image to create seamless textures for tiling as a bitmap fill.
| |
fractalNoise:Boolean (default = true) — A Boolean value. If the value is true, the method generates fractal noise; otherwise, it generates turbulence. An image with turbulence has visible discontinuities in the gradient that can make it better approximate sharper visual effects like flames and ocean waves.
| |
channelOptions:uint (default = 7) — A number that can be a combination of any of the four color channel values (BitmapDataChannel.RED, BitmapDataChannel.BLUE, BitmapDataChannel.GREEN, and BitmapDataChannel.ALPHA). You can use the logical OR operator (|) to combine channel values.
| |
grayScale:Boolean (default = false) — A Boolean value. If the value is true, a grayscale image is created by setting each of the red, green, and blue color channels to identical values. The alpha channel value is not affected if this value is set to true.
|
| setBitmap | () | method |
public function setBitmap(width:Number, height:Number, transparent:Boolean = false, color:uint = 0xFFFFFFFF):voidSets all new components of the bitmap and before dispose it.
Parameters
width:Number — The width of the bitmap image in pixels.
| |
height:Number — The height of the bitmap image in pixels.
| |
transparent:Boolean (default = false) — Specifies whether the bitmap image supports per-pixel transparency. The default value is true (transparent). To create a fully transparent bitmap, set the value of the transparent parameter to true and the value of the fillColor parameter to 0x00000000 (or to 0). Setting the transparent property to false can result in minor improvements in rendering performance.
| |
color:uint (default = 0xFFFFFFFF) — A 32-bit ARGB color value that you use to fill the bitmap image area. The default value is 0xFFFFFFFF (solid white).
|
| setPixel | () | method |
public function setPixel(x:Number, y:Number, color:uint):voidSets a single pixel of a BitmapData object. The current alpha channel value of the image pixel is preserved during this operation. The value of the RGB color parameter is treated as an unmultiplied color value.
Parameters
x:Number — The x position of the pixel whose value changes.
| |
y:Number — The y position of the pixel whose value changes.
| |
color:uint — The resulting RGB color for the pixel.
|
| setPixel32 | () | method |
public function setPixel32(x:Number, y:Number, color:uint):voidets the color and alpha transparency values of a single pixel of a BitmapData object. This method is similar to the setPixel() method; the main difference is that the setPixel32() method takes an ARGB color value that contains alpha channel information.
Parameters
x:Number — The x position of the pixel whose value changes.
| |
y:Number — The y position of the pixel whose value changes.
| |
color:uint — The resulting ARGB color for the pixel. If the bitmap is opaque (not transparent), the alpha transparency portion of this color value is ignored.
|
| unlock | () | method |
public function unlock():voidUnlocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are updated when this BitmapData object changes.