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 bezierCurveTo() နည်းလမ်း

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

ဥပမာ

ကုဗ Bézier မျဉ်းကွေးကို ဆွဲပါ-

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

JavaScript-

var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20, 20);
ctx.bezierCurveTo(20, 100, 200, 100, 200, 20);
ctx.stroke();

Browser ပံ့ပိုးမှု

Internet Explorer Firefox အော်ပရာ Google Chrome ဆာဖာရီ

Internet Explorer 9၊ Firefox၊ Opera၊ Chrome နှင့် Safari တို့သည် bezierCurveTo() နည်းလမ်းကို ပံ့ပိုးပေးသည်။


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

bezierCurveTo() နည်းလမ်းသည် ကုဗ Bézier မျဉ်းကွေးကို ကိုယ်စားပြုသည့် သတ်မှတ်ထားသော ထိန်းချုပ်အမှတ်များကို အသုံးပြုခြင်းဖြင့် လက်ရှိလမ်းကြောင်းသို့ အမှတ်တစ်ခု ထပ်လောင်းသည်။

ကုဗဘေဇီယာမျဉ်းကွေးသည် အချက်သုံးချက် လိုအပ်သည်။ ပထမနှစ်မှတ်သည် ကုဗ Bézier တွက်ချက်မှုတွင် အသုံးပြုသည့် ထိန်းချုပ်မှတ်များဖြစ်ပြီး နောက်ဆုံးအမှတ်မှာ မျဉ်းကွေးအတွက် အဆုံးမှတ်ဖြစ်သည်။ မျဉ်းကွေးအတွက် စမှတ်သည် လက်ရှိလမ်းကြောင်း၏ နောက်ဆုံးအမှတ်ဖြစ်သည်။ လမ်းကြောင်းတစ်ခုမရှိပါက၊ အစမှတ်ကိုသတ်မှတ်ရန် startPath() နှင့် moveTo() နည်းလမ်းများကို အသုံးပြုပါ။

ကုဗ bezier မျဉ်းကွေးတစ်ခု

စတင်အမှတ်
ရွှေ့ရန် ( ၂၀၊၂၀ )
ထိန်းချုပ်ရေးအချက် ၁
bezierCurveTo( 20,100 ,200,100,200,20)
ထိန်းချုပ်ရေးအချက် ၂
bezierCurveTo(20,100,200,100 , 200,20)
အဆုံးမှတ်
bezierCurveTo( 20,100,200,100,200,20 )

အကြံပြုချက်- quadraticCurveTo() နည်းလမ်းကို စစ်ဆေးကြည့်ပါ ။ ၎င်းတွင် နှစ်ခုအစား ထိန်းချုပ်မှုတစ်ခုရှိသည်။


JavaScript syntax- စကား စပ် .bezierCurveTo( cp1x,cp1y,cp2x,cp2y,x,y );

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

Parameter Description Play it
cp1x The x-coordinate of the first Bézier control point
cp1y The y-coordinate of the first Bézier control point
cp2x The x-coordinate of the second Bézier control point
cp2y The y-coordinate of the second Bézier control point
x The x-coordinate of the ending point
y The y-coordinate of the ending point

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