Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Signature Tool
Search
Ji Guang
November 09, 2012
Technology
1
75
Signature Tool
no
Ji Guang
November 09, 2012
Tweet
Share
More Decks by Ji Guang
See All by Ji Guang
Adobe Edge Preview
jiguang
0
67
Blogging Like A Hacker
jiguang
5
270
Basic JavaScript Coding Patterns
jiguang
4
640
Javascript正则表达式
jiguang
3
680
虚拟机调试
jiguang
1
94
DNS缓存清除
jiguang
0
90
哈工大90周年校庆吉祥物评比
jiguang
0
150
Other Decks in Technology
See All in Technology
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
1
630
Next.js に疲れた私は Vue3 に癒やされた
akagire
0
140
生産性向上チームの紹介
cybozuinsideout
PRO
1
920
Babylon.jsと色々なものを組み合わせる:ブラウザのAPIやガジェットや2D描画ライブラリなど / Babylon.js 勉強会 vol.3
you
PRO
0
160
Cloud Service Mesh に触れ合う
phaya72
1
210
20分で完全に理解するGrafanaダッシュボード
hamadakoji
5
890
One engineer company with Ruby on Rails
rstankov
2
430
Improve Your Development Workflow with Gemini Code Assist
meteatamel
0
130
いつか使うかも貯金してたらめちゃめちゃ機能が増えてた話
riyaamemiya
0
620
成長をサポートするピープルマネジメントのやり方
sioncojp
9
1.1k
ルーターでプレゼンする
puhitaku
1
3.3k
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.6k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
33
12k
Bash Introduction
62gerente
605
210k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
Navigating Team Friction
lara
179
13k
Facilitating Awesome Meetings
lara
43
5.6k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
The Language of Interfaces
destraynor
151
23k
Being A Developer After 40
akosma
66
580k
YesSQL, Process and Tooling at Scale
rocio
165
13k
How to Ace a Technical Interview
jacobian
273
22k
Transcript
Signature Tool Improvement Howelin & Laserji 20120919
Implementation HTML5 Canvas PHP GD (SUSE) SUPPORTED ? Canvas :
PHP
Piece of code Canvas Basics Load Image Text Metrics @font-face
(Drag &) Drop Compositing
Canvas Basics <canvas>Sorry!</canvas> try{ document.createElement(‘canvas’).getContext( ‘2d’); }catch(e){ } var canvas
= document.getElementById(‘canvas’); var context = canvas.getContext(‘2d’); context.fillText(‘Hello’,200,60);
Load Image var img_pop = new Image(); img_pop.src = ‘img/pop.png’;
img_pop.onload = function(){ // do sth. }
Text Metrics context.measureText(text).width; The measureText() method returns an object that
contains the width of the specified text, in pixels.
@font-face @font-face { font-family: 'GothamRoundedBook'; src: url("GothamRnd-Book.otf"); } .canvas{font-family: ‘GothamRoundedBook’;}
/*must be used somewhere*/
@font-face @font-face { font-family: MyHelvetica; src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"),
url(MgOpenModernaBold.ttf); font-weight: bold; }
@font-face IE:Embedded OpenType(.eot) Firefox:TrueType,OpenType(.ttf, .otf) & WOFF Chrome:TrueType,OpenType(.ttf, .otf) &
SVG Font(.svg) Safari:TrueType,OpenType(.ttf, .otf) & SVG Font(.svg) Opera:TrueType,OpenType(.ttf, .otf) & SVG Font(.svg)
@font-face WHY NOT? COPYRIGHT & FOUT(Flash of unstyled Text) http://www.google.com/webfonts
(FREE) http://www.fontsquirrel.com/fontface/genera tor (HAS A BLACKLIST)
(Drag &) Drop <span id="custom" ondragenter="return false" ondragover="return false"> Drop
Yours</span> $('#custom')[0].ondrop = function(e){ // do sth. };
(Drag &) Drop DataTransfer e.dataTransfer.files // FileList same as <input
id=“fileItem” type=“file”> var file = document.getElementById('fileItem').files[0 ];
• Compositing globalCompositeOperation = type
Compositing Image must loaded first Image z-Index
Welcome Howe !!!