このページはまだ翻訳されていません。原文の内容が表示されています。
polygon要素関数要素関数要素関数はsetルールやshowルールでカスタマイズできます。
setルールやshowルールでカスタマイズできます。A closed polygon.
The polygon is defined by its corner points and is closed automatically.
Example
#polygon(
  fill: blue.lighten(80%),
  stroke: blue,
  (20%, 0pt),
  (60%, 0pt),
  (80%, 2cm),
  (0%,  2cm),
)

引数引数引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
polygon(fill:,,,)->How to fill the polygon.
When setting a fill, the default stroke disappears. To create a rectangle with both fill and stroke, you have to configure both.
nonefill-rule設定可能引数設定可能引数設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
fill-rulesetルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。The drawing rule used to fill the polygon.
See the curve documentation for an example.
使用可能な文字列値
non-zeroSpecifies that "inside" is computed by a non-zero sum of signed edge crossings.
even-oddSpecifies that "inside" is computed by an odd number of edge crossings.
"non-zero"How to stroke the polygon. This can be:
Can be set to  none to disable the stroke or to auto for a
stroke of 1pt black if and if only if no fill is given.
autovertices必須引数必須引数必須引数は、関数を呼び出す際に必ず指定しなければなりません。位置引数位置引数位置引数は順序通りに指定することで、引数名を省略して設定できます。可変長引数可変長引数可変長引数は複数回指定することができます。
verticesThe vertices of the polygon. Each point is specified as an array of two relative lengths.
定義定義これらの関数や型には、関連する定義を持たせることができます。定義にアクセスするには、対象の関数や型の名前を指定した後に、ピリオド区切りで定義名を記述します。
regular
regularA regular polygon, defined by its size and number of vertices.
例を表示
#polygon.regular(
  fill: blue.lighten(80%),
  stroke: blue,
  size: 30pt,
  vertices: 3,
)

How to fill the polygon. See the general polygon's documentation for more details.
How to stroke the polygon. See the general polygon's documentation for more details.