aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/svg/element/polygon/index.html
blob: 94bbcd39975c05a1fe8e963453f4e3f99a04c19d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
title: <polygon>
slug: Web/SVG/Element/polygon
tags:
  - SVG
translation_of: Web/SVG/Element/polygon
original_slug: Web/SVG/Элемент/polygon
---
<div>{{SVGRef}}</div>

<p>Элемент <strong><code>&lt;polygon&gt;</code></strong> описывает замкнутую фигуру, состоящую из набора последовательно соединённых между собой прямых линий. Для создания незамкнутых фигур используется элемент {{SVGElement("polyline")}}.</p>

<div id="Exemple">
<div class="hidden">
<pre class="brush: css">html,body,svg { height:100% }</pre>
</div>

<pre class="brush: html">&lt;svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"&gt;
  &lt;!-- Example of a polygon with the default fill --&gt;
  &lt;polygon points="0,100 50,25 50,75 100,0" /&gt;

  &lt;!-- Example of the same polygon shape with stroke and no fill --&gt;
  &lt;polygon points="100,100 150,25 150,75 200,0"
            fill="none" stroke="black" /&gt;
&lt;/svg&gt;</pre>

<p>{{EmbedLiveSample('Exemple', 100, 100)}}</p>
</div>

<h2 id="Атрибуты">Атрибуты</h2>

<dl>
 <dt>{{SVGAttr('points')}}</dt>
 <dd>Данный атрибут определяет список точек (независимых пар x,y координат), необходимых для отрисовки фигуры.<br>
 <small><em>Тип значения</em>: <a href="/docs/Web/SVG/Content_type#Number"><strong>&lt;number&gt;</strong></a>+ ; <em>Значение по умолчанию</em>: <code>""</code>; <em>Анимируемый</em>: <strong>да</strong></small></dd>
 <dt>{{SVGAttr("pathLength")}}</dt>
 <dd>Данный атрибут позволяет указывать общую длину пути в пользовательских единицах.<br>
 <small><em>Тип значения</em>: <a href="/docs/Web/SVG/Content_type#Number"><strong>&lt;number&gt;</strong></a> ; <em>Значение по умолчанию</em>: <em>none</em>; <em>Анимируемый</em>: <strong>да</strong></small></dd>
</dl>

<h3 id="Global_attributes">Global attributes</h3>

<dl>
 <dt><a href="/docs/Web/SVG/Attribute/Core">Основные атрибуты</a></dt>
 <dd><small>Самые важные: {{SVGAttr('id')}}, {{SVGAttr('tabindex')}}</small></dd>
 <dt><a href="/docs/Web/SVG/Attribute/Styling">Атрибуты стилизации</a></dt>
 <dd><small>{{SVGAttr('class')}}, {{SVGAttr('style')}}</small></dd>
 <dt><a href="/docs/Web/SVG/Attribute/Conditional_Processing">Условные атрибуты</a></dt>
 <dd><small>Самые важные: {{SVGAttr('requiredExtensions')}}, {{SVGAttr('systemLanguage')}}</small></dd>
 <dt>Атрибуты событий</dt>
 <dd><small><a href="/docs/Web/SVG/Attribute/Events#Global_Event_Attributes">Атрибуты глобальных событий</a>, <a href="/docs/Web/SVG/Attribute/Events#Graphical_Event_Attributes">Атрибуты графических событий</a></small></dd>
 <dt><a href="/docs/Web/SVG/Attribute/Presentation">Presentation Attributes</a></dt>
 <dd><small>Most notably: {{SVGAttr('clip-path')}}, {{SVGAttr('clip-rule')}}, {{SVGAttr('color')}}, {{SVGAttr('color-interpolation')}}, {{SVGAttr('color-rendering')}}, {{SVGAttr('cursor')}}, {{SVGAttr('display')}}, {{SVGAttr('fill')}}, {{SVGAttr('fill-opacity')}}, {{SVGAttr('fill-rule')}}, {{SVGAttr('filter')}}, {{SVGAttr('mask')}}, {{SVGAttr('opacity')}}, {{SVGAttr('pointer-events')}}, {{SVGAttr('shape-rendering')}}, {{SVGAttr('stroke')}}, {{SVGAttr('stroke-dasharray')}}, {{SVGAttr('stroke-dashoffset')}}, {{SVGAttr('stroke-linecap')}}, {{SVGAttr('stroke-linejoin')}}, {{SVGAttr('stroke-miterlimit')}}, {{SVGAttr('stroke-opacity')}}, {{SVGAttr('stroke-width')}}, {{SVGAttr("transform")}}, {{SVGAttr('vector-effect')}}, {{SVGAttr('visibility')}}</small></dd>
 <dt>ARIA атрибуты</dt>
 <dd><small><code>aria-activedescendant</code>, <code>aria-atomic</code>, <code>aria-autocomplete</code>, <code>aria-busy</code>, <code>aria-checked</code>, <code>aria-colcount</code>, <code>aria-colindex</code>, <code>aria-colspan</code>, <code>aria-controls</code>, <code>aria-current</code>, <code>aria-describedby</code>, <code>aria-details</code>, <code>aria-disabled</code>, <code>aria-dropeffect</code>, <code>aria-errormessage</code>, <code>aria-expanded</code>, <code>aria-flowto</code>, <code>aria-grabbed</code>, <code>aria-haspopup</code>, <code>aria-hidden</code>, <code>aria-invalid</code>, <code>aria-keyshortcuts</code>, <code>aria-label</code>, <code>aria-labelledby</code>, <code>aria-level</code>, <code>aria-live</code>, <code>aria-modal</code>, <code>aria-multiline</code>, <code>aria-multiselectable</code>, <code>aria-orientation</code>, <code>aria-owns</code>, <code>aria-placeholder</code>, <code>aria-posinset</code>, <code>aria-pressed</code>, <code>aria-readonly</code>, <code>aria-relevant</code>, <code>aria-required</code>, <code>aria-roledescription</code>, <code>aria-rowcount</code>, <code>aria-rowindex</code>, <code>aria-rowspan</code>, <code>aria-selected</code>, <code>aria-setsize</code>, <code>aria-sort</code>, <code>aria-valuemax</code>, <code>aria-valuemin</code>, <code>aria-valuenow</code>, <code>aria-valuetext</code>, <code>role</code></small></dd>
</dl>

<h2 id="Usage_notes">Usage notes</h2>

<p>{{svginfo}}</p>

<h2 id="Спецификации">Спецификации</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('SVG2', 'shapes.html#PolygonElement', '&lt;polygon&gt;')}}</td>
   <td>{{Spec2('SVG2')}}</td>
   <td>No change</td>
  </tr>
  <tr>
   <td>{{SpecName('SVG1.1', 'shapes.html#PolygonElement', '&lt;polygon&gt;')}}</td>
   <td>{{Spec2('SVG1.1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Совместимость_с_браузерами">Совместимость с браузерами</h2>



<p>{{Compat("svg.elements.polygon")}}</p>

<h2 id="Смотрите_также">Смотрите также</h2>

<ul>
 <li>Другие базовые фигуры SVG: {{ SVGElement('circle') }}, {{ SVGElement('ellipse') }}, {{ SVGElement('line') }}, <strong>{{ SVGElement('polyline') }}</strong>, <strong>{{ SVGElement('rect') }}</strong></li>
</ul>