Hi all,

I have a Main_Overlay that extends Overlay.

Inside Main_Overlay i override the draw method:



public void draw(android.graphics.Canvas canvas, MapView mapView,
boolean shadow )
        {
                 mPath = new Path();
         mPath.moveTo(0, -240);
         mPath.lineTo(-50, -100);
         mPath.lineTo(0, -150);
         mPath.lineTo(50, -100);
         mPath.addCircle(0, 0, 240, Path.Direction.CW);
         mPath.close();

        Paint paint2 = new Paint();
        paint2.setStyle(Paint.Style.FILL);
        paint2.setAlpha(80);


        mPaint.setAntiAlias(true);
        mPaint.setColor(Color.RED);
        mPaint.setStyle(Paint.Style.FILL);
        mPaint.setAlpha(40);

        int w = canvas.getWidth();
        int h = canvas.getHeight();
        int cx = w / 2;
        int cy = h / 2;

        canvas.translate(cx, cy);

        canvas.drawPath(mPath, mPaint);

        }




However, the path is drawn twice. First at 0,0 and then the other at
the bottom right hand side. While it is only drawn once on normal
canvas.

Can somebody please advise me on this?

Thanks
Bryan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to