나는 drawpath를위한이 코드를 가지고 있는데, 아무 것도 나타나지 않고 왜 그럴 수 없는지를 알 수 없다. 당신이 함께 플레이 할 수 있습니다왜 drawPath가 작동하지 않습니까?
private final int strokeWidth = 50;
path.lineTo(a.getCenterX() + strokewidth/2, a.getCenterY() + strokeWidth/2);
path.moveTo(a.getCenterX(), a.getCenterY());
p.setStrokeWidth(strokeWidth);
p.setColor(Color.BLACK);
canvas.drawPath(path,p);
: 사전에
//i move the path's starting point somewhere up here to a point.
//get center x and y are the centers of a picture. it works when i
//do drawline and store the different starting points
//but i want it to look continuous not like a lot of different
//lines
path.lineTo(a.getCenterX(), a.getCenterY());
path.moveTo(a.getCenterX(), a.getCenterY());
p.setStrokeWidth(50);
p.setColor(Color.BLACK);
canvas.drawPath(path,p);
덕분에
어디에서이 코드를 호출합니까? ondraw 방법에서 – Codeman
. 내가 그림을 통해 반복하고 drawline을하면 작동하지만 계속 보이지 않습니다. 당신은 그들이 분리 선이라고 말할 수 있습니다. – Robin
당신은 그것들이 분리 된 줄/연속적이지 않다는 것을 무엇을 의미합니까? 스크린 샷/비디오를 게시하거나 더 자세히 설명 할 수 있습니까? 또한 onDraw 메서드의 맨 위에서 super.onDraw()를 호출하는지 확인하십시오. – Codeman