Pixelet
language
English
日本語
ドキュメント
FAQ
問い合わせ
ダウンロード
language
English
日本語
circle - 円
rect - 四角形
roundRect - 角丸四角形
line - 線
arc - 円弧
polygon - 多角形
fill - 塗り潰し
stroke - ストローク
rotate - 回転
text - テキスト
高度な使い方 - スクリプト
circle - 円
Syntax
circle(x座標, y座標, 幅, 高さ)
Example
circle(2, 4, 5, 10) stroke('black')
rect - 四角形
Syntax
rect(x座標, y座標, 幅, 高さ)
Example
rect(2, 4, 10, 15) stroke('black')
roundRect - 角丸四角形
Syntax
roundRect(x座標, y座標, 幅, 高さ)
Example
roundRect(2, 4, 15, 10) stroke('black')
line - 線
Syntax
line(x座標1, y座標1, x座標2, y座標2)
Example
line(2, 4, 12, 14) stroke('black')
arc - 円弧
Syntax
arc(x座標, y座標, 半径, 開始角度, 終了角度)
Example
arc(10, 10, 5, 0, 180) stroke('black')
polygon - 多角形
Syntax
polygon([x座標1, y座標1, x座標2, y座標2, x座標3, y座標3,...])
Example
polygon([10, 2, 2, 10, 10, 10]) stroke('black')
fill - 塗り潰し
Syntax
fill(色)
Example
circle(2, 4, 5, 5) fill('red')
stroke - ストローク
Syntax
stroke(色)
Example
circle(2, 4, 5, 5) stroke('red')
rotate - 回転
Syntax
rotate(角度)
Example
line(0, 16, 32, 16) rotate(90) line(0, 16, 32, 16) stroke('black')
text - テキスト
Syntax
text(x座標, y座標, 文字, 色, サイズ)
Example
text(0, 0, 'A', 'black', 32)
高度な使い方 - スクリプト
Syntax
任意のJavaScriptコード
Example
for (let i = 0; i < 6; i++) { rotate(30) line(0, 16, 32, 16) } stroke('black')
© 2022 tnantoka