JavaScriptを使ったAJAXが昨年前半まで大いに注目を集めていましたが、その根本になったJavaScript自体は古くからあり、AJAXというのは新しい応用法みたいな側面が非常に強かったのが特徴です。 しかし今回紹介する「Canvas」要素はそういうのとは明らかに一線 ...
HTMLの <canvas> 要素でグラフィックスを扱うには、まず「レンダリングコンテキスト」の取得が必要です。本記事では、Canvas APIの入り口となるコンテキストの初期化から、最も基本的な図形である矩形(長方形)の描画、そして色指定の方法までを解説します。
In the early part of this book the emphasis was on creating graphics by drawing on the canvas. By contrast the latter part of the book is about loading graphics files into the canvas. Why would you ...
手軽に花火を描画するプログラムを作ろうと思ったら、JavaScriptを使ってブラウザ上に描画するのがオススメです。前回紹介したように、Canvas APIを使うと、ブラウザ上に絵や図形を描画できます。しかも、スマートフォンのブラウザを含め、大半のブラウザ ...
画像編集ソフトにある「スポイトツール」のように、Canvas上の特定座標にあるピクセル情報を取得するには、getImageData メソッドとマウスイベントを組み合わせます。これにより、マウスカーソルの位置にある正確なRGB値や透明度をリアルタイムに検出できます ...
One of the operations that low-level APIs tend to give you that higher level graphics systems tend to ignore is the bitblt - bit-block operation (pronounced bit-blit). This is essentially a low-level ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する