1 1 2 2 3 GD 3 3.1 GD.............................. 3 3.2..................................... 4 3.3............................... 4 4 7 5 2 9 5.1...



Similar documents
1 1 2 Unix SVG SVG SVG SVG

!!!!!

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

改訂版 :基本的な文字化の原則(Basic Transcription System for Japanese: BTSJ)


-34-


G-XML

Lecture on

REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

PowerPoint プレゼンテーション

II III I ~ 2 ~

中堅中小企業向け秘密保持マニュアル


PR映画-1

- 2 -



1 (1) (2)


Microsoft Word - ▼工事管理テキスト再校正済.doc

1"

あいち電子自治体ガイドライン(第1章)

provider_020524_2.PDF

pdf

第168回日本胸部外科学会関東甲信越地方会要旨集


タイの食品市場(国庫用)訂正.PDF

untitled

150220_通し

60周年記念 記念誌/扉・扉裏・中扉・資料扉・名簿扉

学内広報 No.1224


本文(縦)/YAZ149T


›¼’à”v“lŠÍ1−ª

特別プログラム

8 浜根知恵(p191‐203)204白/p191‐203

★表紙-背幅5.5mm/表紙

SBI損保の自動車保険 重要事項説明書


表紙(背幅8.5mm)/背幅8.5mm


2

_ZEI-1022_fiÁŁÊ−é›æ-’‘Ä


1 鵜澤幸弘(p7‐26)/性同一障害 p7‐26

広報あつぎ-1月15日号-1面12.indd

A4_元

本文/A6180A


本文/YAY180B


研究紀要 第22号 (分割版 その7)

S \1.E4


プログラム

Microsoft PowerPointの利用 V 1,1 暫定版

World Wide Web =WWW Web ipad Web Web HTML hyper text markup language CSS cascading style sheet Web Web HTML CSS HTML

untitled

untitled


コンピュータグラフィックス - 第4回 色彩の表現

untitled

ワードプロセッシングについて

ルール&マナー集_社内版)_修正版.PDF

HTML HTML HTML

6 2 s µ µµµ µµµµ µ µ h µs µ µµµµ µ µ µ s mµµµµµ µµµ µµ µ u m µmµµµµµ µµ µ µ µ µ µ µ µ µ s 1



6 Tgif William Chia-Wei Chang tgif 3.0 pixmap URL Tgif 6.1: Tgif

G-XML EWEB-3K-N064

" " " " "!!

簡単ViX講座

1 2 Sample Sample Sample 3 1

I II III 28 29

地域と文化資産



<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>


株主通信:第18期 中間

平成27年度版 税金の本 第5章 贈与と税金 第2節 贈与税の特例 (PDF)

2

POINT POINT P




株主通信 第16 期 報告書

untitled



21 POINT 1 POINT 2 POINT 3


514

Transcription:

2 18 2 3

1 1 2 2 3 GD 3 3.1 GD.............................. 3 3.2..................................... 4 3.3............................... 4 4 7 5 2 9 5.1............................. 9 5.2................................. 11 5.3........................... 12 6 PNG HTML 13 6.1.................................. 13 6.2............................... 14 7 point 16 7.1 2...................... 16 7.2 point............... 18 7.3 point................................ 20 7.4 HTML................. 21 8 22 i

24 ii

WWW Unix Unix 2004 WWW SVG 2 2 iii

18 2 1 WWW ( 1) Tgif Tgif Unix Tgif WWW WWW 1 URL 16 1) SVG SVG WWW PNG WWW 2 2 2 HTML Fig. 1 1

2 16 1) Tcl/Tk GUI AWK SVG squiggle WWW PNG AWK Tcl/Tk Tcl Tk GUI SVG W3C WWW SVG SVG SVG SVG 2 1 GD PNG GD PNG SVG PNG GD PNG 2 2 2 1 3 size size x 1 y 1 x 2 y 2 build build " " x 1 y 1 road road " " x 1 y 1 x 2 y 2...x n y n Table 1 size (x 1, y 1 ) (x 2, y 2 ) build 2

2 (x 1, y 1 ) road (x 1, y 1 ) (x n, y m ) 3 GD 3.1 GD GD gd lib perl gd lib PNG JPEG GIF PNG gd lib gd lib perl GD GD GD #!/usr/local/gnu/bin/perl use GD; # GD lib $im = new GD::Image(400,400); # $white = $im->colorallocate(255,255,255); $black = $im->colorallocate(0,0,0); $red = $im->colorallocate(255,0,0); # binmode STDOUT; # print $im->png; # PNG 3

file.pl perl file.pl > file.png xli file.png PNG PNG 3.2 GD 3 GD::Image GD GD::Font GD 5 GD::Polygon 3.3 new() new() GD::Image 64 64 truecolor 24 (R/G/B 8 ) 8 $im->new([$width,$heigt],[$truecolor]) $im->new(*filehandle) $im->new($filename) $im->new($data) newfrompng() 4

2 newfrompng() PNG PNG undef binmode(filehandle) STDIN $im->$newfrompng($file, [$truecolor]) $im->newfrompngdata($data, [$truecolor]) colorallocate() colorallocate() GD::Image 1 $im->colorallocate($red,$green,$blue) line() line() (x1,y1) (x2,y2) $im->line($x1,$y1,$x2,$y2,$color) setthickness() setthickness() line(),rectangle(),arc() 1 (10, 190) (140, 10) 3 $im->setthickness($thickness) ( ) $im->setthickness(3); $im->line(10,190,140,10,$black); 5

ellipse() filledellipse() ellipse() (cx,cy) (width,height) filledellipse() $im->ellipse($cx,$cy,$width,$height,$color) $im->filledellipse($cx,$cy,$width,$height,$color) fill() fill() (x,y) $im->fill($x,$y,$color) unclosedpolygon() unclosedpolygon() new GD::polygon Polygon (250, 10) (200, 80) (280, 100) (250, 180) $im->unclosedpolygon($poly,$color) ( ) $poly = new GD::Polygon; $poly->addpt(250,10); $poly->addpt(200,80); $poly->addpt(280,100); $poly->addpt(250,180); $im->unclosedpolygon($poly,$black); 6

2 string() GD lib 5 string() (x,y) gdsmallfont gdmediumboldfont gdtinyfont gd- LargeFont gdgiantfont 5 $im->string($font,$x,$y,$string,$color) stringft() stringft() TrueType 1 2 (120,150) 12 80 @bounds = $im->stringft($fgcolor,$fontname,$ptsize,$angle,$x,$y, $string) fgcolor : fontname : ptsize : ( ) angle : ( ) x,y : string : ( )$jpmfont= /usr/local/x11/share/fonts/ttf/ipam.ttf ; @bounds = $im->stringft($black,$jpmfont,12,120,150,80," "); 4 PNG 7

#!/usr/local/gnu/bin/perl use GD; use encoding "euc-jp"; $jpmfont= /usr/local/x11/share/fonts/ttf/ipam.ttf ; $im = new GD::Image(300,200); $white = $im->colorallocate(255,255,255); $black = $im->colorallocate(0,0,0); $red = $im->colorallocate(255,0,0); $im->line(0,0,300,200,$red); $im->setthickness(3); $im->line(10,190,140,10,$black); $im->setthickness(1); $im->ellipse(120,130,150,100,$black); $im->fill(120,130,$red); $poly = new GD::Polygon; $poly->addpt(250,10); $poly->addpt(200,80); $poly->addpt(280,100); $poly->addpt(250,180); $im->unclosedpolygon($poly,$black); @bounds = $im->stringft($black,$jpmfont,12,120,150,80," "); binmode STDOUT; print $im->png; 2 PNG 8

2 Fig. 2 5 2 5.1 2 ID r 1,r 2,r 3, b 1,b 2,b 3, ID road r1 " 8 " w 0 400 700 450 build b1 " " r 195 480 ID 9

3 (1) (2) (1) GD (2) ( ) GD 2 (1) (2) Fig. 3 (1) (2) (2) (2) (2) 2 1 build ID ID build b1 " " r 20 50 e1 r1 30 40 e2 r2 30 60 build ID ID ID e 2 build link link ID ID ID link link e1 20 50 b1 r1 link e2 30 60 b1 r2 10

2 2 build build build build build link link 5.2 road road ( ) point point p1 c 20 50 r1 r2 point p2 c 90 30 r4 r6 point p3 l 60 60 b1 r1 2 p 1 p 2 p n ID 3 c l c l 4 5 6 7 r 1 r 2 2 ID b 1 r 1 ID 2 11

road 1 1 road 11 1 2 road 7 5.3 size build road point 2 size size x 1 y 1 x 2 y 2 build build ID " " x 1 y 1 road road ID " " x 1 y 1 x 2 y 2...x n y n point ( ) point ID " " x 1 y 1 r a r b point ( ) point ID " " x 1 y 1 r a b a Table 2 size (x 1, y 1 ) (x 2, y 2 ) (x 1, y 1 ) (x 2, y 2 ) build ID (x 1, y 1 ) 3 12

2 r c s Table 3 build road ID (x 1, y 1 ) (x n, y m ) 4n n w r Table 4 road point ID c (x 1, y 1 ) IDr a r b ID l (x 1, y 1 ) IDr a b a ID point 2 6 PNG HTML PNG HTML 6.1 point point size 0 0 1000 700 road r1 " " n 0 400 700 450 1000 600 13

road r2 "" n 100 700 120 405 road r3 "" n 150 415 170 0 road r4 "" w 220 550 228 374 1000 280 road r5 "" w 500 700 530 335 road r6 "" w 900 700 850 350 700 0 road r7 "" w 848 340 700 400 road r8 "" w 740 470 720 315 605 150 road r9 "" w 600 333 580 250 650 0 road r10 "" w 400 150 595 200 800 160 road r11 "" r 0 500 700 650 1000 530 build b1 " " r 195 480 build b2 " " r 460 450 build b3 " " r 550 420 build b4 " " r 600 420 build b5 " " r 770 350 build b6 " " r 180 400 build b7 "ENEOS" s 215 400 build b8 "ENEOS" s 715 375 build b9 "JOMO" s 505 420 build b10 " " c 400 410 build b11 " " t 220 560 6.2 PNG HTML perl PNG HTML GD lib (0, 0) (0, 0) (0, 0) 5 14

2 n 7 w 4 r 4 r 8 c 6 s 6 t 10 Table 5 HTML build build b1 " " re 195 480 <area shape="circle" coords="195,220,8" href="#b1 " alt=" "> PNG 4 15

Fig. 4 7 point road point 7.1 2 5 A B A OP = OP 1 + P 1 P = OP 1 + t P 1 P 2 = OP + t( OP 2 OP 1 ) 16

2 P1 (x1, y1) t OP1 OP O (0,0) P3 (x3, y3) 1 - s s P(x, y) 1 - P2 (x2, y2) P4 (x4, y4) 0 < = s < = 1 0 < t < = = 1 t A B Fig. 5 A B = [ x1 y 1 ] + t [ x2 x 1 y 2 y 1 ] = [ x1 + t(x 2 x 1 ) y 1 + t(y 2 y 1 ) ] { x = x1 + t(x 2 x 1 ) y = y 1 + t(y 2 y 1 ) (0 t 1) (1) B { x = x3 + s(x 4 x 3 ) y = y 3 + s(y 4 y 3 ) (0 s 1) (2) 2 (1) (2) { x1 + t(x 2 x 1 ) = x 3 + s(x 4 x 3 ) y 1 + t(y 2 y 1 ) = y 3 + s(y 4 y 3 ) (3) (3) s t { (x2 x 1 )t (x 4 x 3 )s = x 3 x 1 (y 2 y 1 )t (y 4 y 3 )s = y 3 y 1 (4) 17

(4) [ x2 x 1 x 3 x 4 ] [ t } y 2 y 1 y 3 y 4 {{ } s A ] = [ x3 x 1 y 3 y 1 ] (5) A = (x 2 x 1 )(y 3 y 4 ) (x 3 x 4 )(y 2 y 1 ) 0 (6) (6) 0 (6) (5) t s [ t s ] = A 1 [ x3 x 1 y 3 y 1 ] = 1 [ y3 y 4 x 4 x 3 A y 1 y 2 x 2 x 1 ] [ x3 x 1 y 3 y 1 ] (7) (7) (5) P 1 P 2 P 3 P 4 0 t 1 0 s 1 (8) (8) 2 2 7.2 point point perl size build road ID point 18

2 road r1 " " n 0 400 700 450 1000 600 road r2 "" n 100 700 120 405 road r100 "" w 900 700 0 500 point p1 "" c 120 409 r1 r2 point p2 "" c 607 443 r1 r100 6 (0, 0) (1000,700) Fig. 6 point ID point point p1 "" c 120 409 r1 r2 point p2 "" c 150 411 r1 r3 point p3 "" c 226 416 r1 r4 point p4 "" c 522 437 r1 r5 point p5 "" c 877 538 r1 r6 19

point p6 "" c 740 470 r1 r8 point p7 "" c 922 561 r1 r11 point p8 "" c 112 524 r2 r11 point p9 "" c 530 337 r4 r5 point p10 "" c 829 301 r4 r6 point p11 "" c 719 314 r4 r8 point p12 "" c 599 329 r4 r9 point p13 "" c 220 547 r4 r11 point p14 "" c 508 609 r5 r11 point p15 "" c 846 341 r6 r7 point p16 "" c 771 166 r6 r10 point p17 "" c 882 577 r6 r11 point p18 "" c 729 388 r7 r8 point p19 "" c 607 153 r8 r9 point p20 "" c 634 192 r8 r10 point p21 "" c 594 200 r9 r10 7.3 point point point 2 1 s p 1 p 2 p 3 p 4 p 6 p 7 p 8 p 9 p 12 p 14 p 15 p 16 point ( ) b 20

2 point p22 " " b 300 370 r4 point p23 " " b 480 350 r4 point p24 "" b 800 310 r4 point p25 "" b 730 100 r8 point p26 "" b 515 650 r7 point p27 "" b 490 180 r5 7.4 HTML PNG HTML 1 point point s b 7 Fig. 7 HTML point p17 " " b 300 370 r4 <area shape="circle" coords="300,314,8" href="#p17 " alt=" "> 21

PNG PNG 8 Fig. 8 8 perl GD PNG 2 PNG 2004 1) SVG SVG WWW 22

2 PNG GD 2 ID 1 1 point perl 2 point HTML PNG HTML perl PNG HTML 2 2 23

[1] (2005) [2] Lincoln D.Stein GD (ver 2.28) [3] ( ) 24