HTML canvas lineJoin attribute
Definition and usage
lineJoin
Property settings or returns the type of corner created when two lines intersect.
주의사항:The value "miter" is affected by miterLimit The influence of properties.
Example
When two lines intersect, create a circular corner:
JavaScript:
var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.beginPath(); ctx.lineJoin="round"; ctx.moveTo(20,20); ctx.lineTo(100,50); ctx.lineTo(20,100); ctx.stroke();
문법
context.lineJoin="bevel|round|miter";
속성 값
값 | 설명 |
---|---|
bevel | 사각 모서리를 생성합니다. |
round | 원형 모서리를 생성합니다. |
miter | 기본. 점이 찍힌 모서리를 생성합니다. |
기술 세부 사항
기본값: | miter |
---|
브라우저 지원
표의 숫자는 이 속성을 최초로 완전히 지원하는 브라우저 버전을 나타냅니다.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
4.0 | 9.0 | 3.6 | 4.0 | 10.1 |
주의사항:Internet Explorer 8 이상의 버전은 <canvas> 요소를 지원하지 않습니다.