はじめてのcanvas

はじめてのcanvas

えーものすごく小さいことなんだけど、日付のところに時計のアイコンが出るようにしました。凝視してみるとわかると思うんだけど、時計なんですよこれ。

で、これ、gifでもjpgでもpngでもtiffでもsvgでもswfでもましてbmpでもなくて、canvasなんです!!詳しくはこことかこことかで見て!

ずっとこのcanvasを使ってみたかったんだけどあんまり見聞きしないし、正直面倒だったので後回し後回しになってたんだけど、やっと踏み込みました。いつもどおり「うはーわからーん、わからんわー!」と言いながらの作業でした。
とりあえずーな感じの仕上がりなので、もうちょっとなんとかしたいところ。

んでまぁ、感想。

  • 最初ちょう取っ付きにくかった(SVGもこんなだったような気はするけど)
  • わかんないんだけど、絵が出るものは安心できる
  • これ、単位にemとか使えねえの?pxビタとかやなんだけど(これ痛い)
  • なので、現状だとブラウザのフォントサイズ変更についてけない…(jsでなんとかできるかなぁ)
  • 多分、あんまりいい使い方してないよね… これグラフとかに使うんだよね…(あとアニメーションとか)
  • 次はアニメーションかなー

IEは全バージョンでcanvasに対応していないんだけど、uupaa-excanvas.jsを利用してIE(6〜)でもOKな感じになってます。確認は7でやってるから、6とか8とかだと見えてないかもしんないなー。

追記:
ブラウザのフォントサイズ変更についてくように修正した。JavaScriptのSetIntervalでフォントサイズを監視して、変更があればcanvasも描画し直しってやりかたで。

Leave a Reply
  • (will not be published)

Me

Yasutaka Sato

more

Tags
add-on again album amazon analytics animal apologize app apple appreciation bag baseball battle beauty birthday blog blood blue bluetooth body book bookmark bought brave broken browser burn camera canon canvas car care catalyst change chocolate chrome chromium circle cleaning code coffee coffeeshop coke command communication complete conference cook coupon creation css cui cute dark db design desire desktop diary disqualification dizzy drama dream drive drunk eeepc empty erotic error essay fake false fav festival firewall fireworks flirt font food forgot fortune frame france friends from iPhone fx game geek geolocation girl google graph hack hatena headache holiday hot house hungry ice impressions interesting ipad iphone ipod itunes jailbreak jetpack jquery js json kicks kiss kobe kyoto leopard lie life lifestyle light lighttpd linux livedoor logic lost love lunch lyric mac macbook mail map maps marriage mcdonald's me memo mental message microsoft miss misunderstanding mobile moblin morning mouse movie music mysql mystery name neet netbook newbalance news newyear night notebook occupation omelet os pack pain parting past pc peace peperoncino perl phobia photo photoshare php picture plan pleasure plugin poem pop producer profile pwned rabbit radio rain rap recipe redo regret relation release remember reminiscence repeat reverse rice rip rnb rrd sakura scan scare search server sex shinjuku sick simple sky slept slim smell snack snowboard softbank sorrow sound souvenir spaghetti speed sports ssd star start station store streaming stupid stystk suicide summer sunrise switch tears temperature temple terminal test thanks thought time tips tokyo trable trance travel true tumblr twitter uneasy urban used uupaa vacation various vertigo video walk wandering web weight wifi word work wp year-end you youtube