LoginSignup
0
0

More than 3 years have passed since last update.

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

Last updated at Posted at 2020-05-01

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

strokeCap()

説明文

LINEの端形状を設定します。これらの端は、2乗、拡張、丸められており、それぞれが対応するパラメータ SQUARE、PROJECT、ROUNDで指定します。デフォルトは ROUND です。

構文

strokeCap(cap​​)

パラメタ

  • cap
    定数:SQUARE、PROJECT、ROUND のいずれか

function draw() {
  strokeWeight(20.0);

  strokeCap(ROUND);
  line(20, 30, 150, 30);

  strokeCap(PROJECT);
  line(20, 70, 150, 70);

  strokeCap(SQUARE);
  line(20, 110, 150, 110);
}

実行結果

strokeCap.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