Обучение canvas

  • Revision slug: Обучение_canvas
  • Revision title: Обучение canvas
  • Revision id: 282786
  • Created:
  • Creator: Chernetsky
  • Is current revision? Нет
  • комментировать

Revision Content

<canvas> is a new HTML element which can be used to draw graphics using scripting (usually JavaScript). It can for instance be used to draw graphs, make photo compositions or do simple (and not so simple) animations. The image on the right shows some examples of <canvas> implementations which we will see later in this tutorial.

<canvas> was first introduced by Apple for the Mac OS X Dashboard and later implemented in Safari. Gecko 1.8-based browsers, such as Firefox 1.5, also support this new element. The <canvas> element is part of the WhatWG Web applications 1.0 specification also known as HTML 5.

In this tutorial I will try to describe how to implement the <canvas> element in your own HTML pages. The examples provided should give you some clear ideas what you can do with <canvas> and can be used to start building your own implementations.

Прежде, чем начать

Using the <canvas> element isn't very difficult but you do need a basic understanding of HTML and JavaScript.

As stated above, the <canvas> element isn't supported in all modern browsers so you will need Firefox 1.5, another recent Gecko-based browser, Opera 9, or a recent version of Safari to see all the examples in action.

В этой статье

Смотри также

{{template.Next("Canvas tutorial:Basic usage")}}

{{ wiki.languages( { "en": "en/Canvas_tutorial", "fr": "fr/Tutoriel_canvas", "ja": "ja/Canvas_tutorial", "ko": "ko/Canvas_tutorial", "pl": "pl/Przewodnik_po_canvas", "zh-cn": "cn/Canvas_tutorial" } ) }}

Revision Source

<p>
<img align="right" src="File:ru/Media_Gallery/Canvas_tut_examples.jpg"><b><code><a href="ru/HTML/Canvas">&lt;canvas&gt;</a></code></b> is a new <a href="ru/HTML">HTML</a> element which can be used to draw graphics using scripting (usually <a href="ru/JavaScript">JavaScript</a>). It can for instance be used to draw graphs, make photo compositions or do simple (and <a href="ru/A_Basic_RayCaster">not so simple</a>) animations. The image on the right shows some examples of <code>&lt;canvas&gt;</code> implementations which we will see later in this tutorial.
</p><p><code>&lt;canvas&gt;</code> was first introduced by Apple for the <a class="external" href="http://www.apple.com/macosx/features/dashboard/">Mac OS X Dashboard</a> and later implemented in Safari. <a href="ru/Gecko">Gecko</a> 1.8-based browsers, such as Firefox 1.5, also support this new element. The <code>&lt;canvas&gt;</code> element is part of the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/">WhatWG Web applications 1.0</a> specification also known as HTML 5.
</p><p>In this tutorial I will try to describe how to implement the <code>&lt;canvas&gt;</code> element in your own HTML pages. The examples provided should give you some clear ideas what you can do with &lt;canvas&gt; and can be used to start building your own implementations.
</p>
<h3 name=".D0.9F.D1.80.D0.B5.D0.B6.D0.B4.D0.B5.2C_.D1.87.D0.B5.D0.BC_.D0.BD.D0.B0.D1.87.D0.B0.D1.82.D1.8C"> Прежде, чем начать </h3>
<p>Using the <code>&lt;canvas&gt;</code> element isn't very difficult but you do need a basic understanding of <a href="ru/HTML">HTML</a> and <a href="ru/JavaScript">JavaScript</a>.
</p><p>As stated above, the <code>&lt;canvas&gt;</code> element isn't supported in all modern browsers so you will need Firefox 1.5, another recent Gecko-based browser, Opera 9, or a recent version of Safari to see all the examples in action.
</p>
<h3 name=".D0.92_.D1.8D.D1.82.D0.BE.D0.B9_.D1.81.D1.82.D0.B0.D1.82.D1.8C.D0.B5"> В этой статье </h3>
<ul><li> <a href="ru/Canvas_tutorial/Basic_usage">Basic usage</a>
</li><li> <a href="ru/Canvas_tutorial/Drawing_shapes">Drawing shapes</a>
</li><li> <a href="ru/Canvas_tutorial/Using_images">Using images</a>
</li><li> <a href="ru/Canvas_tutorial/Applying_styles_and_colors">Applying styles and colors</a>
</li><li> <a href="ru/Canvas_tutorial/Transformations">Transformations</a>
</li><li> <a href="ru/Canvas_tutorial/Compositing">Compositing</a>
</li><li> <a href="ru/Canvas_tutorial/Basic_animations">Basic animations</a>
</li></ul>
<h3 name=".D0.A1.D0.BC.D0.BE.D1.82.D1.80.D0.B8_.D1.82.D0.B0.D0.BA.D0.B6.D0.B5"> Смотри также </h3>
<ul><li> <a href="ru/HTML/Canvas">Canvas topic page</a>
</li><li> <a href="ru/Drawing_Graphics_with_Canvas">Drawing Graphics with Canvas</a>
</li><li> <a href="Special:Tags?tag=Canvas_examples&amp;language=ru">Canvas examples</a>
</li></ul>
<p>{{template.Next("Canvas tutorial:Basic usage")}}
</p>{{ wiki.languages( { "en": "en/Canvas_tutorial", "fr": "fr/Tutoriel_canvas", "ja": "ja/Canvas_tutorial", "ko": "ko/Canvas_tutorial", "pl": "pl/Przewodnik_po_canvas", "zh-cn": "cn/Canvas_tutorial" } ) }}
Revert to this revision