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
78
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
73
Blogging Like A Hacker
jiguang
5
280
Basic JavaScript Coding Patterns
jiguang
4
640
Javascript正则表达式
jiguang
3
690
虚拟机调试
jiguang
1
110
DNS缓存清除
jiguang
0
110
哈工大90周年校庆吉祥物评比
jiguang
0
170
Other Decks in Technology
See All in Technology
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
140
レビューを増やしつつ 高評価維持するテクニック
tsuzuki817
1
480
Cloud Spanner 導入で実現した快適な開発と運用について
colopl
1
320
ユーザーストーリーマッピングから始めるアジャイルチームと並走するQA / Starting QA with User Story Mapping
katawara
0
170
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
1
230
Datadog APM におけるトレース収集の流れ及び Retention Filters のはなし / datadog-apm-trace-retention-filters
k6s4i53rx
0
330
利用終了したドメイン名の最強終活〜観測環境を育てて、分析・供養している件〜 / The Ultimate End-of-Life Preparation for Discontinued Domain Names
nttcom
1
120
運用しているアプリケーションのDBのリプレイスをやってみた
miura55
1
490
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
16
6.3k
『衛星データ利用の方々にとって近いようで触れる機会のなさそうな小話 ~ 衛星搭載ソフトウェアと衛星運用ソフトウェア (実物) を動かしながらわいわいする編 ~』 @日本衛星データコミニティ勉強会
meltingrabbit
0
140
アジャイル開発とスクラム
araihara
0
170
Datadogとともにオブザーバビリティを布教しよう
mego2221
0
130
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Adopting Sorbet at Scale
ufuk
74
9.2k
Being A Developer After 40
akosma
89
590k
Why Our Code Smells
bkeepers
PRO
336
57k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Making Projects Easy
brettharned
116
6k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Visualization
eitanlees
146
15k
How to Ace a Technical Interview
jacobian
276
23k
Scaling GitHub
holman
459
140k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
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 !!!