Implement all arguments to BitmapData.draw
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jeash |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Hello I am wanting to use a scale9grid method to resize images. Is this part of the nme api not yet implemented in jeash?
For example this works with flash and cpp but not the html5;
public static function scale9Bitmap (w:Int,
var bmpData:BitmapData = new BitmapData (w,h,true,
var rows:Array<Float> = [0,_scale9Grid.
var cols:Array<Float> = [0,_scale9Grid.
var dRows:Array<Float> = [0,_scale9Grid.
var dCols:Array<Float> = [0,_scale9Grid.
var origin:Rectangle;
var draw:Rectangle;
var mat:Matrix = new Matrix ();
var cx:Int = 0;
while (cx < 3) {
var cy:Int = 0;
while (cy < 3) {
origin = new Rectangle (cols[cx]
draw = new Rectangle (dCols[
mat.identity ();
mat.a = draw.width / origin.width;
mat.d = draw.height / origin.height;
mat.tx = draw.x - origin.x * mat.a;
mat.ty = draw.y - origin.y * mat.d;
bmpData.draw (originalBitmap
cy ++;
}
cx ++;
}
return bmpData;
}
I've been meaning to fix this, but haven't yet had the time.