| Package | net.flashpunk.graphics | 
| Class | public class Image | 
| Inheritance | Image    Graphic   Object | 
| Subclasses | PreRotation, Spritemap, Text, TiledImage | 
| Property | Defined By | ||
|---|---|---|---|
![]()  | active : Boolean = false 
		 If the graphic should update.  | Graphic | |
| alpha : Number 
		 Change the opacity of the Image, a value from 0 to 1.  | Image | ||
| angle : Number = 0 
		 Rotation of the image, in degrees.  | Image | ||
| blend : String 
		 Optional blend mode to use when drawing this image.  | Image | ||
| clipRect : Rectangle [read-only] 
		 Clipping rectangle for the image.  | Image | ||
| color : uint 
		 The tinted color of the Image.  | Image | ||
| drawMask : BitmapData 
		 Set the transparency mask of the Image.  | Image | ||
| flipped : Boolean 
		 If you want to draw the Image horizontally flipped.  | Image | ||
| height : uint [read-only] 
		 Height of the image.  | Image | ||
| locked : Boolean [read-only] 
		 True if the image is locked.  | Image | ||
| originX : Number = 0 
		 X origin of the image, determines transformation point.  | Image | ||
| originY : Number = 0 
		 Y origin of the image, determines transformation point.  | Image | ||
![]()  | relative : Boolean = true 
		 If the graphic should render at its position relative to its parent Entity's position.  | Graphic | |
| scale : Number = 1 
		 Scale of the image, affects both x and y scale.  | Image | ||
| scaledHeight : Number 
		 The scaled height of the image.  | Image | ||
| scaledWidth : Number 
		 The scaled width of the image.  | Image | ||
| scaleX : Number = 1 
		 X scale of the image.  | Image | ||
| scaleY : Number = 1 
		 Y scale of the image.  | Image | ||
![]()  | scrollX : Number = 1 
		 X scrollfactor, effects how much the camera offsets the drawn graphic.  | Graphic | |
![]()  | scrollY : Number = 1 
		 Y scrollfactor, effects how much the camera offsets the drawn graphic.  | Graphic | |
| smooth : Boolean 
		 If the image should be drawn transformed with pixel smoothing.  | Image | ||
| tinting : Number 
		 The amount the image will be tinted, suggested values from
		 0 to 1.  | Image | ||
| tintMode : Number 
		 The tint mode - multiply or colorize.  | Image | ||
![]()  | visible : Boolean = true 
		 If the graphic should render.  | Graphic | |
| width : uint [read-only] 
		 Width of the image.  | Image | ||
![]()  | x : Number = 0 
		 X offset.  | Graphic | |
![]()  | y : Number = 0 
		 Y offset.  | Graphic | |
| Property | Defined By | ||
|---|---|---|---|
| _alpha : Number = 1 | Image | ||
![]()  | assign : Function | Graphic | |
| _class : String | Image | ||
| _color : uint = 0x00FFFFFF | Image | ||
| _colorTransform : ColorTransform | Image | ||
| _drawMask : BitmapData | Image | ||
| _flip : BitmapData | Image | ||
| _flipped : Boolean | Image | ||
| _flips : Object [static]    | Image | ||
| _matrix : Matrix | Image | ||
| source : BitmapData [read-only]    | Image | ||
| _tint : ColorTransform | Image | ||
| _tintFactor : Number = 1.0 | Image | ||
| _tintMode : Number = 0.0 | Image | ||
| Method | Defined By | ||
|---|---|---|---|
Image(source:*, clipRect:Rectangle = null) 
		 Constructor.  | Image | ||
centerOO():void 
		 Centers the Image's originX/Y to its center.  | Image | ||
centerOrigin():void 
		 Centers the Image's originX/Y to its center.  | Image | ||
clear():void 
		 Clears the image buffer.  | Image | ||
createCircle(radius:uint, color:uint = 0xFFFFFF, alpha:Number = 1):Image [static] 
		 Creates a new circle Image.  | Image | ||
createGradient(width:uint, height:uint, fromX:Number, fromY:Number, toX:Number, toY:Number, fromColor:uint, toColor:uint, fromAlpha:Number = 1, toAlpha:Number = 1):Image [static] 
		 Creates a new gradient Image.  | Image | ||
createRect(width:uint, height:uint, color:uint = 0xFFFFFF, alpha:Number = 1):Image [static] 
		 Creates a new rectangle Image.  | Image | ||
lock():void 
		 Lock the image, preventing updateBuffer() from being run until
		 unlock() is called, for performance.  | Image | ||
![]()  | render(target:BitmapData, point:Point, camera:Point):void 
		 Renders the graphic to the screen buffer.  | Graphic | |
unlock():void 
		 Unlock the image.  | Image | ||
![]()  | update():void 
		 Updates the graphic.  | Graphic | |
updateBuffer(clearBefore:Boolean = false):void 
		 Updates the image buffer.  | Image | ||
| Method | Defined By | ||
|---|---|---|---|
updateColorTransform():void 
		 Updates the color transform
		   | Image | ||
| Constant | Defined By | ||
|---|---|---|---|
| TINTING_COLORIZE : Number = 1.0 [static] 
		 tintMode value to tint in colorize mode.  | Image | ||
| TINTING_MULTIPLY : Number = 0.0 [static] 
		 tintMode value to tint in multiply mode.  | Image | ||
| _alpha | property | 
protected var _alpha:Number = 1
| _class | property | 
protected var _class:String
| _color | property | 
protected var _color:uint = 0x00FFFFFF
| _colorTransform | property | 
protected var _colorTransform:ColorTransform
| _drawMask | property | 
protected var _drawMask:BitmapData
| _flip | property | 
protected var _flip:BitmapData
| _flipped | property | 
protected var _flipped:Boolean
| _flips | property | 
protected static var _flips:Object
| _matrix | property | 
protected var _matrix:Matrix
| _tint | property | 
protected var _tint:ColorTransform
| _tintFactor | property | 
protected var _tintFactor:Number = 1.0
| _tintMode | property | 
protected var _tintMode:Number = 0.0
| alpha | property | 
alpha:NumberChange the opacity of the Image, a value from 0 to 1.
    public function get alpha():Number    public function set alpha(value:Number):void| angle | property | 
public var angle:Number = 0Rotation of the image, in degrees.
| blend | property | 
public var blend:StringOptional blend mode to use when drawing this image. Use constants from the flash.display.BlendMode class.
| clipRect | property | 
clipRect:Rectangle  [read-only] Clipping rectangle for the image.
    public function get clipRect():Rectangle| color | property | 
color:uintThe tinted color of the Image. Use 0xFFFFFF to draw the Image normally with the default blending mode. Default: 0xFFFFFF.
    public function get color():uint    public function set color(value:uint):void| drawMask | property | 
drawMask:BitmapDataSet the transparency mask of the Image.
    public function get drawMask():BitmapData    public function set drawMask(value:BitmapData):void| flipped | property | 
flipped:BooleanIf you want to draw the Image horizontally flipped. This is faster than setting scaleX to -1 if your image isn't transformed.
    public function get flipped():Boolean    public function set flipped(value:Boolean):void| height | property | 
height:uint  [read-only] Height of the image.
    public function get height():uint| locked | property | 
locked:Boolean  [read-only] True if the image is locked.
    public function get locked():Boolean| originX | property | 
public var originX:Number = 0X origin of the image, determines transformation point. Defaults to top-left corner.
| originY | property | 
public var originY:Number = 0Y origin of the image, determines transformation point. Defaults to top-left corner.
| scale | property | 
public var scale:Number = 1Scale of the image, affects both x and y scale.
| scaledHeight | property | 
scaledHeight:NumberThe scaled height of the image.
    public function get scaledHeight():Number    public function set scaledHeight(value:Number):void| scaledWidth | property | 
scaledWidth:NumberThe scaled width of the image.
    public function get scaledWidth():Number    public function set scaledWidth(value:Number):void| scaleX | property | 
public var scaleX:Number = 1X scale of the image.
| scaleY | property | 
public var scaleY:Number = 1Y scale of the image.
| smooth | property | 
public var smooth:BooleanIf the image should be drawn transformed with pixel smoothing. This will affect drawing performance, but look less pixelly. Defaults to not smoothed.
| source | property | 
source:BitmapData  [read-only] 
    protected function get source():BitmapData| tinting | property | 
tinting:NumberThe amount the image will be tinted, suggested values from 0 to 1. 0 Means no change, 1 is full color tint. Default: 1.
    public function get tinting():Number    public function set tinting(value:Number):void| tintMode | property | 
tintMode:NumberThe tint mode - multiply or colorize. Default: multiply. See Image.TINTING_MULTIPLY and Image.TINTING_COLORIZE.
    public function get tintMode():Number    public function set tintMode(value:Number):void| width | property | 
width:uint  [read-only] Width of the image.
    public function get width():uint| Image | () | Constructor | 
public function Image(source:*, clipRect:Rectangle = null)Constructor.
Parameterssource:* — 	Source image.
		  | |
clipRect:Rectangle (default = null) — Optional rectangle defining area of the source image to draw.
		  | 
| centerOO | () | method | 
 public function centerOO():voidCenters the Image's originX/Y to its center.
| centerOrigin | () | method | 
 public function centerOrigin():voidCenters the Image's originX/Y to its center.
| clear | () | method | 
 public function clear():voidClears the image buffer.
| createCircle | () | method | 
 public static function createCircle(radius:uint, color:uint = 0xFFFFFF, alpha:Number = 1):ImageCreates a new circle Image.
Parameters
radius:uint — 	Radius of the circle.
		  | |
color:uint (default = 0xFFFFFF) — 	Color of the circle.
		  | |
alpha:Number (default = 1) — 	Alpha of the circle.
		  | 
Image — A new Image object.
		  | 
| createGradient | () | method | 
 public static function createGradient(width:uint, height:uint, fromX:Number, fromY:Number, toX:Number, toY:Number, fromColor:uint, toColor:uint, fromAlpha:Number = 1, toAlpha:Number = 1):ImageCreates a new gradient Image.
Parameters
width:uint — 	Width of the image.
		  | |
height:uint — 	Height of the image.
		  | |
fromX:Number — 	X coordinate to start gradient at.
		  | |
fromY:Number — 	Y coordinate to start gradient at.
		  | |
toX:Number — 		X coordinate to end gradient at.
		  | |
toY:Number — 		X coordinate to end gradient at.
		  | |
fromColor:uint — Color at start of gradient.
		  | |
toColor:uint — 	Color at end of gradient.
		  | |
fromAlpha:Number (default = 1) — Alpha at start of gradient.
		  | |
toAlpha:Number (default = 1) — 	Alpha at end of gradient.
		  | 
Image — A new Image object.
		  | 
| createRect | () | method | 
 public static function createRect(width:uint, height:uint, color:uint = 0xFFFFFF, alpha:Number = 1):ImageCreates a new rectangle Image.
Parameters
width:uint — 	Width of the rectangle.
		  | |
height:uint — 	Height of the rectangle.
		  | |
color:uint (default = 0xFFFFFF) — 	Color of the rectangle.
		  | |
alpha:Number (default = 1) | 
Image — A new Image object.
		  | 
| lock | () | method | 
 public function lock():voidLock the image, preventing updateBuffer() from being run until unlock() is called, for performance.
| unlock | () | method | 
 public function unlock():voidUnlock the image. Any pending updates will be applied immediately.
| updateBuffer | () | method | 
 public function updateBuffer(clearBefore:Boolean = false):voidUpdates the image buffer.
Parameters
clearBefore:Boolean (default = false) | 
| updateColorTransform | () | method | 
 protected function updateColorTransform():voidUpdates the color transform
| TINTING_COLORIZE | Constant | 
public static const TINTING_COLORIZE:Number = 1.0tintMode value to tint in colorize mode.
| TINTING_MULTIPLY | Constant | 
public static const TINTING_MULTIPLY:Number = 0.0tintMode value to tint in multiply mode.