2016-09-19 1 views
0

나는 내 캔버스에 그림을 그려있다. 그 위에 다른 모양을 그려 넣었다. 최종 결과는 그림이 새 모양이어야한다. 첫 번째 원 아래에서 그림을 그려야한다.Z 변경 방법 Z 드로잉 후 캔버스에서 원의 높이?

오래된 원의 고도를 다시 위로 변경하는 방법이 있습니까?

난이 기능 3, 전화를 원하기 때문에 내가 모든 것을 위에 또 다른 원을 그립니다하지 않으려는 4 회 두 번째 여기

내 클래스입니다 :

Paint ciclePaint = new Paint(); 
     ciclePaint.setColor(getResources().getColor(R.color.cicleShapeOutline)); 
     ciclePaint.setStrokeWidth(40f); 
     ciclePaint.setStyle (Paint.Style.STROKE); 

     Paint innerCiclePaint = new Paint(); 
     innerCiclePaint.setColor(getResources().getColor(R.color.cicleShapeOutline)); 
     innerCiclePaint.setStrokeWidth(3f); 
     innerCiclePaint.setStyle (Paint.Style.STROKE); 

     canvas.drawCircle(getWidth()/2f, getHeight()/2f, (600f), ciclePaint); 

     canvas.drawCircle(getWidth()/2f, getHeight()/2f, (450f), innerCiclePaint); 

     canvas.drawCircle(getWidth()/2f, getHeight()/2f, (300f), innerCiclePaint); 

     canvas.drawCircle(getWidth()/2f, getHeight()/2f, (150f), innerCiclePaint); 



     //THIS NEEDS TO SHOW BEFORE THE THREE CIRCLES 

     Paint canvasFillForTestings = new Paint(); 
     canvasFillForTestings.setColor(getResources().getColor(R.color.colorAccent)); 

     canvas.drawPath(pathsArray.get(7), canvasFillForTestings); 

답변

0

당신은 그리해야 아래에 나타나는 원 앞에 새로운 모양. z 순서는 그리기 순서에 따라 다릅니다.

+0

나중에 입력으로 오기 때문에 항상 새로운 모양을 그릴 것입니다. 이후에 새로운 모양을 그릴 수는 있지만 앱에 실제로 무거울 것입니다. –

관련 문제