File: Xtest.pic

package info (click to toggle)
dpic 2023.06.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,868 kB
  • sloc: ansic: 10,262; yacc: 5,827; makefile: 286; sh: 156; awk: 129; sed: 32
file content (40 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PS
#
# Xtest.pic
# To produce Xtest.svg (the sed filter deletes the external latex lines):
#   sed -e '/^\\/d' Xtest.pic | dpic -v > Xtest.svg


scale = 72                      # set the scale to points (bp)

  define grid { [
    for x=0 to $1 by 50 do { line from (x,$2) down $2 
            sprintf("%g",x) below
      if x < $1 then {
        for dx = 10 to 40 by 10 do { line thick 0.4 from (x+dx,$2) down $2 } }
      }
    for y=0 to $2 by 50 do { line from (0,y) right $1 
            sprintf("%g",y) ljust
      if y < $2 then {
        for dy = 10 to 40 by 10 do { line thick 0.4 from (0,y+dy) right $1 } }
      }
    S: ($1/2,0)
    W: (0,$2/2)
    ] }

  B: box invis wid 6*scale ht 6*scale
  Grid: grid(100,100) with .W at B.w+(50,00)

# textoffset = 0
if dpicopt == optPGF then {
  command "\font\testfont=ptmr at 100bp"
# command "s_init(Xtest)sinclude(dpic-doc.dim)"
  X: "\boxdims{Xtest_1}{\testfont X}" \
 wid 72.47075*(scale/72.27) ht 67.5524*(scale/72.27)+0.0*(scale/72.27) with .s at Grid.S
  }
if dpicopt == optSVG then { textht = 100
  X: "X" wid 72 with .s at Grid.S
  textht = 11
  }
# box wid X.wid ht X.ht at X
.PE