I want to combine several bitmaps together (I am making a paperdoll system).
I can't get Bitmap.blt to do anything though.
This is my code:
hair_bitmap = this.loadBitmap('img/hair/', hair, hue, false); body_bitmap = this.loadBitmap('img/bases/', body, hue, false); bmp = new Bitmap(body_bitmap.width, body_bitmap.height); bmp.blt(body_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0); bmp.blt(hair_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0);If I use hair_bitmap or body_bitmap individually, I get their graphic.
If I use bmp I get nothing at all.
If I run blt on hair_bitmap or body_bitmap, I just get their original bitmap (so blt is doing seemingly nothing).
I am guessing I have got the blt function wrong:
> bmp.blt(hair_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0);
Any ideas where I am going wrong?
I can't get Bitmap.blt to do anything though.
This is my code:
hair_bitmap = this.loadBitmap('img/hair/', hair, hue, false); body_bitmap = this.loadBitmap('img/bases/', body, hue, false); bmp = new Bitmap(body_bitmap.width, body_bitmap.height); bmp.blt(body_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0); bmp.blt(hair_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0);If I use hair_bitmap or body_bitmap individually, I get their graphic.
If I use bmp I get nothing at all.
If I run blt on hair_bitmap or body_bitmap, I just get their original bitmap (so blt is doing seemingly nothing).
I am guessing I have got the blt function wrong:
> bmp.blt(hair_bitmap, 0, 0, body_bitmap.width, body_bitmap.height, 0, 0);
Any ideas where I am going wrong?