HTML အကိုးအကား

အက္ခရာဖြင့် HTML HTML အမျိုးအစားအလိုက် HTML Browser ပံ့ပိုးမှု HTML အရည်အချင်းများ HTML ကမ္ဘာလုံးဆိုင်ရာ အရည်အချင်းများ HTML ပွဲများ HTML အရောင်များ HTML Canvas HTML အသံ/ဗီဒီယို HTML အက္ခရာအစုံများ HTML Doctypes HTML URL ကုဒ် HTML ဘာသာစကားကုဒ်များ HTML နိုင်ငံကုဒ်များ HTTP မက်ဆေ့ခ်ျများ HTTP နည်းလမ်းများ PX မှ EM Converter ကီးဘုတ်ဖြတ်လမ်းများ


HTML canvas arcTo() နည်းလမ်း

❮ HTML Canvas အကိုးအကား

ဥပမာ

ကင်းဗတ်စ်ပေါ်ရှိ တန်းဂျင့်နှစ်ခုကြားတွင် အကွေးတစ်ခု ဖန်တီးပါ-

သင်၏ဘရောက်ဆာသည် HTML5canvastag ကိုမပံ့ပိုးပါ။

JavaScript-

var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20, 20);           // Create a starting point
ctx.lineTo(100, 20);          // Create a horizontal line
ctx.arcTo(150, 20, 150, 70, 50); // Create an arc
ctx.lineTo(150, 120);         // Continue with vertical line
ctx.stroke();                // Draw it

Browser ပံ့ပိုးမှု

ဇယားရှိ နံပါတ်များသည် နည်းလမ်းကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။

Method
arcTo() Yes 9.0 Yes Yes No

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

arcTo() method သည် canvas ပေါ်ရှိ tangents နှစ်ခုကြားတွင် arc/curve တစ်ခု ဖန်တီးပေးသည်။

ကင်းဗတ်စ် arcto() ပုံကြမ်း

အကြံပြုချက်- ကင်းဗတ်စ်ပေါ်တွင် အနားကို အမှန်တကယ်ဆွဲရန် stroke() နည်းလမ်းကို အသုံးပြု ပါ။

JavaScript syntax- စကား စပ် .arcTo( x1,y1,x2,y2,r );

ကန့်သတ်တန်ဖိုးများ

Parameter Description Play it
x1 The x-coordinate of the first tangent
y1 The y-coordinate of the first tangent
x2 The x-coordinate of the second tangent
y2 The y-coordinate of the second tangent
r The radius of the arc

❮ HTML Canvas အကိုးအကား