Packagech.unil.cbg.ExpressionView.utilities
Classpublic class LargeBitmapData

The LargeBitmapData class can store bitmapdata of arbitrary size.


Example
The example shows how to use the LargeBitmapData class with a bitmap of 10000 x 10000 pixels.
  
  var width:Number = 10000;
  var height:Number = 10000;
  largebitmapdata = new LargeBitmapData(width, height);
  ...
  
  



Public Properties
 PropertyDefined by
  height : Number
LargeBitmapData
  width : Number
LargeBitmapData
Public Methods
 MethodDefined by
  
LargeBitmapData(_width:Number = 1, _height:Number = 1)
Constructor.
LargeBitmapData
  
getData(sourceRect:Rectangle, targetRect:Rectangle):BitmapData
Get the rescaled bitmapdata.
LargeBitmapData
  
getPixel(x:Number, y:Number):uint
Get the color of a Pixel.
LargeBitmapData
  
lock():void
Lock largebitmapdata before setting pixels.
LargeBitmapData
  
setPixel(x:Number, y:Number, value:uint):void
Set the color of a Pixel.
LargeBitmapData
  
unlock():void
Unlock largebitmapdata after setting pixels.
LargeBitmapData
Property detail
heightproperty
public var height:Number
widthproperty 
public var width:Number
Constructor detail
LargeBitmapData()constructor
public function LargeBitmapData(_width:Number = 1, _height:Number = 1)

Constructor.

Parameters
_width:Number (default = 1)
 
_height:Number (default = 1)
Method detail
getData()method
public function getData(sourceRect:Rectangle, targetRect:Rectangle):BitmapData

Get the rescaled bitmapdata.

Parameters
sourceRect:Rectangle — Part of the bitmap you want to scale
 
targetRect:Rectangle — Target size

Returns
BitmapData — Bitmapdata containing a rescaled part of the bitmap
getPixel()method 
public function getPixel(x:Number, y:Number):uint

Get the color of a Pixel.

Parameters
x:Number — x-Position
 
y:Number — y-Position

Returns
uint — uint representing the color
lock()method 
public function lock():void

Lock largebitmapdata before setting pixels.

setPixel()method 
public function setPixel(x:Number, y:Number, value:uint):void

Set the color of a Pixel.

Parameters
x:Number — x-Position
 
y:Number — y-Position
 
value:uint — uint representing the color
unlock()method 
public function unlock():void

Unlock largebitmapdata after setting pixels.