LoginSignup
0
0

More than 3 years have passed since last update.

P5.js 日本語リファレンス(strokeWeight)

Last updated at Posted at 2020-05-01

このページでは「P5.js 日本語リファレンス」 の strokeWeight関数を説明します。

strokeWeight()

説明文

線、点、図形の周囲の境界線に使用されるストローク(線)の幅を設定します。すべての幅はピクセル単位で設定されます。

構文

strokeWeight(weight)

パラメタ

  • weight
    Number:ストロークの太さ(ピクセル単位)

function draw() {
  strokeWeight(1); // デフォルト
  line(20, 20, 80, 20);
  strokeWeight(4); // 太い
  line(20, 40, 80, 40);
  strokeWeight(10); // すごく太い
  line(20, 70, 80, 70);
}

実行結果

strokeWeight.png

著作権

p5.js was created by Lauren McCarthy and is developed by a community of collaborators, with support from the Processing Foundation and NYU ITP. Identity and graphic design by Jerel Johnson.

ライセンス

Creative Commons(CC BY-NC-SA 4.0) に従います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0