HTML canvas lineCap Property
ဥပမာ
အဝိုင်းသား အဆုံးထုပ်များဖြင့် မျဉ်းတစ်ကြောင်းဆွဲပါ-
JavaScript-
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.lineCap = "round";
ctx.moveTo(20, 20);
ctx.lineTo(20, 200);
ctx.stroke();
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
lineCap | 4.0 | 9.0 | 3.6 | 4.0 | 10.1 |
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
lineCap ပိုင်ဆိုင်မှုသည် စာကြောင်းတစ်ခုအတွက် အဆုံးထုပ်များ၏ စတိုင်ကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
မှတ်ချက်- "အဝိုင်း" နှင့် "စတုရန်း" တန်ဖိုးသည် မျဉ်းများကို အနည်းငယ်ရှည်စေသည်။
မူလတန်ဖိုး: | တင်းပါး |
---|---|
JavaScript syntax- | စကား စပ် .lineCap = "butt|round|square"; |
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
butt | Default. A flat edge is added to each end of the line | |
round | A rounded end cap is added to each end of the line | |
square | A square end cap is added to each end of the line |
❮ Canvas Object