2008-07-16から1日間の記事一覧

キャンバスで遊び中 - 簡易お絵描き

JS

http://www.fujidig.com/misc/js/canvas/oekaki.html mousemoveイベントの発行タイミングとドラッグ - 素人がプログラミングを勉強していたブログの改造。 たしか一番最初にCanvasをいじったプログラム。この記事がCanvasを触るきっかけでした(前からいつか…

キャンバスで遊び中 - ランダム模様

JS

HSP でもこういうのを作ったことを記憶してます。なつかしす。 http://www.fujidig.com/misc/js/canvas/get-image-data.html function rand256() { return Math.floor(Math.random()*256); } var canvas = document.body.appendChild(document.createElement…

キャンバスで遊び中 - 光の三原色

JS

var canvas = document.body.appendChild(document.createElement('canvas')); canvas.width = 480; canvas.height = 480; var ctx = canvas.getContext('2d'); ctx.fillStyle = 'black'; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.translate(c…

文字テーブル作成

キャンバスで遊び中 - テキスト表示 - fujidigの雑記 でつかった http://www.fujidig.com/2008/06/images/chars.png の画像を作るときに使った。 buffer 1 FAMILY = "VL ゴシック" SIZE = 128 font FAMILY, SIZE pos 32000 : mes " " W = ginfo_mesx H = gin…