Skip to content

lineTo()

SS Huh edited this page Jan 24, 2021 · 3 revisions
  • Canvas의 메서드
  • 기능 : 바로 이전의 점과 현재의 점을 연결하는 선을 그린다.
  • 사용방법 예제

context.beginPath();

context.moveTo(x1,y1);

context.lineTo(x2,y2);

context.stroke();

Clone this wiki locally