Stretch a bitmap

I had this thought.
With Air for Android you always want to be as fast as possible of course. (especially me since my coding is not excellent)

I need to draw 3 lines repeatedly. (only three visible at any given time)

My thought is, rather than actually drawing the lines, you have three 1 px cached bitmaps in an array


for (var i:uint=0; i<3; i++)
{
    var bmd:BitmapData = new BitmapData(1,1,false,0x000000);
    var bmp:Bitmap = new Bitmap(bmd);
    bmp.cacheAsBitmap=true;
    bmp.cacheAsBitmapMatrix = new Matrix();
    imageArray.push(bmp);
}

to draw the lines:

for (var j:uint=0; j<3; j++)
{
    var line:Bitmap = imageArray[j];
    property= objectArray[j].property;  // get predetermined properties
    line.x = property;
    line.y = property;
    line.width = 200; //stretch it out to the proper length
    line.height = 5; // line thickness
    line.rotation = 40;
    addChild(line);
}

I suppose i will have to test and see if its actually faster or not.

the idea is that your just manipulating separate cached bitmaps to act as your visual lines.