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
77
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
72
Blogging Like A Hacker
jiguang
5
270
Basic JavaScript Coding Patterns
jiguang
4
640
Javascript正则表达式
jiguang
3
690
虚拟机调试
jiguang
1
100
DNS缓存清除
jiguang
0
100
哈工大90周年校庆吉祥物评比
jiguang
0
160
Other Decks in Technology
See All in Technology
SkiaとImpellerについて
moriya0130
0
140
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
150
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
670
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
340
OCI Vault 概要
oracle4engineer
PRO
0
9.8k
SAP Community and Developer Update
sygyzmundovych
0
350
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
420
Storybook との上手な向き合い方を考える
re_taro
5
2.3k
強いチームと開発生産性
onk
PRO
36
12k
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
260
Featured
See All Featured
Unsuck your backbone
ammeep
668
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
730
Navigating Team Friction
lara
183
14k
Done Done
chrislema
181
16k
For a Future-Friendly Web
brad_frost
175
9.4k
Statistics for Hackers
jakevdp
796
220k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Producing Creativity
orderedlist
PRO
341
39k
A Philosophy of Restraint
colly
203
16k
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 !!!