ホーム HTML CSS XML JAVASCRIPT   PHP SQL MORE...   リファレンス 事例集    

HTML5 チュートリアル

HTML5 ホーム
HTML5 概要
HTML5 新しい要素
HTML5 ビデオ
HTML5 ビデオ/DOM
HTML5 オーディオ
HTML5 キャンバス
HTML5 Geolocation
HTML5 Web ストレージ

HTML5 フォーム

HTML5 Input タイプ
HTML5 フォーム要素
HTML5 フォーム属性

HTML5 リファレンス

HTML5 タグ
HTML5 属性
HTML5 イベント
HTML5 キャンバス 2d
HTML 妥当な DTD

HTML5 タグ

<!-->
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<datalist>
<dd>
<del>
<details>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1> - <h6>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<keygen>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>

HTML5 canvas bezierCurveTo メソッド

HTML5 track Tag Reference HTML5 canvas リファレンス

ある点から別の点へパスを描画し、2つの controllpoint からパスを伸ばします:

あなたのブラウザは canvas タグをサポートしていません。

JavaScript:

var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20,20);
ctx.bezierCurveTo(20,100,200,100,200,20);
ctx.stroke();

Try it yourself »

定義と用法

bezierCurveTo メソッドは、2つの controlpoint を経由して、パスの現在ポイントから指定されたポイント点へ線を作成します。

bezierCurveTo メソッドは、最初の controlpoint の x 座標と y 座標、 2番目の controlpoint の x 座標と y 座標と、指定先の x 座標と y 座標の 6 つのパラメータをとります。


現在のポイント
moveTo(20,20)
CurveTo ポイント
bezierCurveTo(20,100,200,100,200,20)
Controllpoint 1
bezierCurveTo(20,100,200,100,200,20)
Controllpoint 2
bezierCurveTo(20,100,200,100,200,20)

チップ: quadraticCurveTo メソッドをチェックしてください。それには、2 つではなく 1 つの controllpoint があります。


JavaScript 構文: context.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y);


ブラウザ・サポート

Internet Explorer Firefox Opera Google Chrome Safari

bezierCurveTo メソッドは、主要な全ブラウザがサポートしています。


パラメータ値

パラメータ 説明 Play it
cp1x x-coordinate 最初の controlpoint の x 座標 Play it »
cp1y y-coordinate 最初の controlpoint の y 座標 Play it »
cp2x x-coordinate 2番目の controlpoint の x 座標 Play it »
cp2y y-coordinate 2番目の controlpoint の y 座標 Play it »
x x-coordinate 線を引く場所の x 座標 Play it »
y y-coordinate 線を引く場所の y 座標 Play it »

HTML5 track Tag Reference HTML5 canvas リファレンス