2013-04-01 7 views
2

경로를 사용하여 캔버스에 선을 그릴 때 나는 아래 그림과 같이 거의 결함이 없다 ... 나는 안드로이드 개발에 익숙하다. 나는 바보 같은 실수를하고 있음을 알고있다. 나는 그것이 무엇인지 모른다. 입니다 ... 누군가가 아이디어 도움말 me..thanks캔버스 라인 결함

enter image description here

근래 경우

enter image description here

내 경로 코드는

path.moveTo((this.pos/2),0); 
       path.lineTo((this.pos/2),25); 
       path.lineTo(this.pos,25); 
       path.close(); 
       canvas.drawPath(path, ppaint); 
+0

시도 할 수)? –

답변

1

그냥 01,239,173를 사용할 수있다. drawPath()는 코드에서 예상대로 작동;

+0

날 위해 drawpath 시각적 결함을 제공합니다. – Akilan

0

당신이 원하는 결과가 어떤 스크린 샷입니다

ctx.beginPath(); 
ctx.moveTo((this.pos/2),0); 
ctx.lineTo((this.pos/2),25); 
ctx.lineTo(this.pos,25); 
ctx.closePath(); 
ctx.strokeStyle = "Red";//border color here 
ctx.stroke(); 
ctx.fillStyle = "blue";//fill color here 
ctx.fill(); 
관련 문제