Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Signature Tool
Search
Ji Guang
November 09, 2012
Technology
91
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Signature Tool
no
Ji Guang
November 09, 2012
Transcript
15 slides
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 !!!
More Decks by Ji Guang
See All by Ji Guang
Adobe Edge Preview
jiguang
0
87
Blogging Like A Hacker
jiguang
5
290
Basic JavaScript Coding Patterns
jiguang
4
660
Javascript正则表达式
jiguang
3
700
虚拟机调试
jiguang
1
120
DNS缓存清除
jiguang
0
150
哈工大90周年校庆吉祥物评比
jiguang
0
200
Other Decks in Technology
See All in Technology
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
5
650
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
350
AWS Blocksで AIエージェント作れるの知ってます?
kmiya84377
1
170
競馬予想をAIでやってみた話
yoshimura_datam
0
140
フルTypeScript × AI駆動開発で開発量が数倍に (JSConf JP 2026 スポンサーLT:NCDC株式会社)
keitaibaraki
0
490
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
400
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
120
NutanixへのSSHアクセスの今後について
shadowhat
0
180
品質を積み上げられるようにする
goyoki
0
530
Fukurou Labo_Engineer_Deck
fukuroulabo
0
110
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
480
フロントエンドのテストカバレッジは 100%強制がいい
bengo4com
7
3.7k
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
910
Marketing to machines
jonoalderson
1
6k
The Invisible Side of Design
smashingmag
301
52k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
310
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
Statistics for Hackers
jakevdp
799
230k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
710