File: kaitest.tcl

package info (click to toggle)
graphviz 14.0.5-2
  • links: PTS
  • area: main
  • in suites: sid
  • size: 139,388 kB
  • sloc: ansic: 141,938; cpp: 11,957; python: 7,766; makefile: 4,043; yacc: 3,030; xml: 2,972; tcl: 2,495; sh: 1,388; objc: 1,159; java: 560; lex: 423; perl: 243; awk: 156; pascal: 139; php: 58; ruby: 49; cs: 31; sed: 1
file content (25 lines) | stat: -rwxr-xr-x 538 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# next line is a comment in tcl \
exec tclsh "$0" ${1+"$@"}

package require Gdtclft

set font /usr/local/share/ttf/kai.ttf

set gd [gd create 600 700]
set white [gd color new $gd 255 255 255]
set black [gd color new $gd 0 0 0]

set angle 0
set size 14
set color $black
set x 50

set y 30
#set string "abcdefghijklmnopqrstuvwxyz\r\nABCDEFGHIJKLMNOPQRSTUVWXYZ"
set string "The next line is JIS-8 coded:\r\n½ĶP~ڤ"
gd text $gd $color $font $size $angle $x $y $string

set f [open "| xv -" w]
gd writePNG $gd $f
close $f