class nape.util.BitmapDebug extends Debug

Available on all platforms

BitmapDebug available on flash10+ only. *

* This debug draw makes use of Alchemy opcodes so you may wish to forgo it * if you do not want to be subjcet to Adobe licensing rules should you also * be using Stage3D. *

* This debug draw draws things pixel by pixel into alchemy memory, flushing * to a BitmapData object. Believe it or not, this is in almost all cases * 'faster' than flash's built in graphics API.

Instance Fields

function new(width:Int, height:Int, ?bgColour:Int = 3355443, ?transparent:Bool = false):Void

Construct new BitmapDebug object. * *

width

The width of Debug draw viewport. *

height

The height of Debug draw viewport. *

bgColour

The background colour for debug draw. (default 0x333333) *

transparent

If true, then the debug draw will use an ARGB bitmap * with a transparent background. This will be slower. * (default false) *

returns

The constructed BitmapDebug. *

function clear():Void

@inheritDoc

function draw(object:Dynamic):Void

@inheritDoc

function drawAABB(aabb:AABB, colour:Int):Void

@inheritDoc

function drawCircle(position:Vec2, radius:Float, colour:Int):Void

@inheritDoc

function drawCurve(start:Vec2, control:Vec2, end:Vec2, colour:Int):Void

@inheritDoc

function drawFilledCircle(position:Vec2, radius:Float, colour:Int):Void

@inheritDoc

function drawFilledPolygon(polygon:Dynamic, colour:Int):Void

@inheritDoc

function drawFilledTriangle(p0:Vec2, p1:Vec2, p2:Vec2, colour:Int):Void

@inheritDoc

function drawLine(start:Vec2, end:Vec2, colour:Int):Void

@inheritDoc

function drawPolygon(polygon:Dynamic, colour:Int):Void

@inheritDoc

function drawSpring(start:Vec2, end:Vec2, colour:Int, ?coils:Int = 3, ?radius:Float = 3.0f):Void

@inheritDoc

function flush():Void

@inheritDoc

function prepare():Void

Prepare BitmapDebug for operations. *

* If you are using any other Alchemy code along side BitmapDebug, then you must * call this method before performing draw operations so that the assignemd * memory block is correctly set.