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

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

ဥပမာ

150*100 pixels စတုဂံတစ်ခုဆွဲပါ-

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

JavaScript-

var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.strokeRect(20, 20, 150, 100);

Browser ပံ့ပိုးမှု

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

Method
strokeRect() Yes 9.0 Yes Yes Yes

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

strokeRect() method သည် ထောင့်မှန်စတုဂံတစ်ခုဆွဲသည် (ဖြည့်စွက်ခြင်းမရှိပါ)။ လေဖြတ်ခြင်း၏ မူရင်းအရောင်မှာ အနက်ရောင်ဖြစ်သည်။

အကြံပြုချက်- လေဖြတ်ခြင်းကို ပုံစံချရန် အရောင်၊ အရောင်အသွေး၊ သို့မဟုတ် ပုံစံတစ်ခုကို သတ်မှတ်ရန် strokeStyle ပိုင်ဆိုင်မှုကို အသုံးပြု ပါ။

JavaScript syntax- စကား စပ် .strokeRect( x၊y၊width၊height ) ;

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

Parameter Description Play it
x The x-coordinate of the upper-left corner of the rectangle
y The y-coordinate of the upper-left corner of the rectangle
width The width of the rectangle, in pixels
height The height of the rectangle, in pixels

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