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 circular corners:
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>.