In Canvas drawing,how move ShapeDrawble object that created by path?
<p>In Canvas drawing,how move ShapeDrawble object that created by path will effecient?</p>

<p>The code below is seemingly through new path to move,so that hava to recreate ShapeDrawable object every time.This is very waste resources,is there any way to solve?</p>

<pre><code>private void drawBitmapShape(Canvas canvas, Paint paint)
    {
         /*Draw a hollow triangle*/
        Path path=new Path();
        path.moveTo(10, 330);
        path.lineTo(70,330);
        path.lineTo(40,270);
        path.close();
        //canvas.drawPath(path, paint);

        /* create ShapeDrawable object and define the shape is elliptic */
        mShape = new ShapeDrawable(new PathShape(path, BitQQheight, BitQQheight));

        /* set up the ellipse things to draw for ShapeDrawable pictures */
        mShape.getPaint().setShader(mBitmapShader);
        /*set display area*/
        //BitQQheight=BitQQheight*2;
        mShape.setBounds(0,0, BitQQwidth, BitQQheight);

        /* draw ShapeDrawableQQ */
        mShape.draw(canvas);
    }
</code></pre>
