Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: third_party/cld/encodings/compact_enc_det/detail_head_string.inc

Issue 1956183002: CL for perf tryjob on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Produced by stringify.cc on 2007-09-28 09:13 from file i18n/encodings/compact _enc_det/tools/detail_head.ps
2 "%!PS-Adobe-2.0\n\n/inch {72 mul} def\n/cshow {dup stringwidth pop -2 div"
3 " 0 rmoveto show} def\n\n/lmargin 0.5 inch def\n/rmargin 8.5 inch def\n/t"
4 "margin 10.5 inch def\n/bmargin 0.5 inch def\n\n\n% set to N>=0 to track "
5 "ranked encoding N\n/track-me -1 def\n/track-me2 -1 def\n\n/columns 2 def"
6 "\n\n/lpi 18 def % lines per inch\n/lpc lpi 10 mul def "
7 " % lines per column\n/lpp lpc columns mul def % lines per page\n"
8 "/probw 3.0 inch def % probability width\n/probr 50 def "
9 " % probability range\n/widowlines lpi 2 idiv def % 1/2 inch widow a"
10 "t bottom\n/widowlines lpi def % 1 inch widow at bottom\n\n/lpg l"
11 "pi 2 idiv def % 1/2 inch spacing between groups\n\n/delc 4 inch "
12 "def\n/dell -1 inch lpi div def\n\n/next-line 0 def % 24 lines per i"
13 "nch, 240 per column\n\n/Cfont /Courier findfont 6 scalefont def\n/Hfont "
14 "/Helvetica findfont 6 scalefont def\nHfont setfont\n\n\n% simple string "
15 "hash -- sum the characters\n/strhash {\n /hstr exch def\n /h 0 def\n "
16 "0 1 hstr length 1 sub {/i exch def /h h hstr i get add def} for\n h\n}"
17 " def\n\n% convert pro at 30 per 2x to 0-2.5 inches spanning -50 to 0\n/p"
18 "rob2x {\n 30 idiv probr div probw mul neg probw add\n}def\n\n\n/cliptoc"
19 "olumn {\n % ====== MUST MATCH ME ======\n gsave\n lmargin tmargin mov"
20 "eto\n next-line lpc idiv delc mul 0 rmoveto\n -1 18 rmoveto 0 -10.5 in"
21 "ch rlineto delc 2 add 0 rlineto 0 10.5 inch rlineto closepath\n clip\n"
22 " newpath\n} def\n\n/endcliptocolumn {\n grestore\n % ====== MUST MATC"
23 "H ME ======\n} def\n\n\n\n/column-box {\n lmargin tmargin moveto\n nex"
24 "t-line 1 sub lpc idiv delc mul next-line 1 sub lpc mod 1 add dell mul r"
25 "moveto\n % box\n gsave -1.5 0 rmoveto 0 detail-count dell mul neg rmov"
26 "eto probw 3 add 0 rlineto 0.25 setlinewidth stroke grestore\n gsave -1"
27 ".5 0 rmoveto 0 detail-count dell mul neg rlineto 0.25 setlinewidth strok"
28 "e grestore\n gsave probw .8 mul 0 rmoveto 0 detail-count dell mul neg r"
29 "lineto 0.25 setlinewidth 0.8 setgray stroke grestore\n gsave probw .6 m"
30 "ul 0 rmoveto 0 detail-count dell mul neg rlineto 0.25 setlinewidth 0.8 s"
31 "etgray stroke grestore\n gsave probw .4 mul 0 rmoveto 0 detail-count de"
32 "ll mul neg rlineto 0.25 setlinewidth 0.8 setgray stroke grestore\n gsav"
33 "e probw .2 mul 0 rmoveto 0 detail-count dell mul neg rlineto 0.25 setlin"
34 "ewidth 0.8 setgray stroke grestore\n gsave probw 1.5 add 0 rmoveto 0 de"
35 "tail-count dell mul neg rlineto 0.25 setlinewidth stroke grestore\n} def"
36 "\n\n\n/IncrementLine {\n /incr exch def\n /next-line next-line incr ad"
37 "d def\n next-line lpc ge next-line incr sub lpc lt and {\n % We "
38 "just went to the top of column 2; redo clip\n endcliptocolumn % M"
39 "UST match\n column-box\n /next-line lpc def\n cliptocolumn "
40 " % MUST match\n } if\n next-line lpp ge {\n % We just went to the"
41 " top of column 3; start new page column 1\n endcliptocolumn % MUS"
42 "T match\n column-box\n showpage\n Hfont setfont\n /next-line"
43 " 0 def\n show-pageno\n cliptocolumn % MUST match\n } if\n}"
44 " def\n\n/IncrementLineOutside {\n /incr exch def\n /next-line next-lin"
45 "e incr add def\n next-line lpc ge next-line incr sub lpc lt and {\n"
46 " % We just went to the top of column 2\n /next-line lpc def\n } i"
47 "f\n next-line lpp ge {\n % We just went to the top of column 3; star"
48 "t new page column 1\n showpage\n Hfont setfont\n /next-line 0 d"
49 "ef\n show-pageno\n } if\n} def\n\n/NextColumn {\n lpc 1 sub Increme"
50 "ntLine\n} def\n\n/NextPage {\n lpp 1 sub IncrementLine\n} def\n\n% Up"
51 "on entry, we are OUTSIDE the clip\n/start-detail {\n /d-title exch def\n"
52 "\n % align >= 1 inch at bottom of column, and/or start new column\n lp"
53 "c next-line lpc mod sub widowlines lt {\n % Start at top of a column\n"
54 " next-line lpc ge {\n % Start new page\n showpage\n Hf"
55 "ont setfont\n /next-line 0 def\n show-pageno\n } {\n %"
56 " Start new column\n /next-line lpc def\n } ifelse\n } if\n\n l"
57 "margin tmargin moveto\n next-line lpc idiv delc mul next-line lpc mod "
58 "dell mul rmoveto\n gsave d-title show grestore\n 0 dell rmoveto\n 1 1"
59 " 4 {/j exch def gsave probw j mul 5 div -2 rmoveto 50 j 10 mul sub 20 st"
60 "ring cvs cshow grestore} for\n 2 IncrementLineOutside\n /detail-count "
61 "1 def\n cliptocolumn % MUST match\n /d-array [] def\n} def\n"
62 "\n/size-detail {\n /d-names exch def\n /d-size exch def\n % zero sums"
63 "\n /sums d-size array def\n 0 1 d-size 1 sub {/i exch def sums i 0 pu"
64 "t} for\n /old-d-max 0 def\n /colors d-size array def\n 0 1 d-size 1 s"
65 "ub {/i exch def colors i i 3 mul 17 mod 17 div put} for\n %0 1 d-size "
66 "1 sub {/i exch def colors i d-names i get strhash 3 mul 17 mod 17 div p"
67 "ut} for\n %0 1 d-size 1 sub {/i exch def ( ) show colors i get 20 stri"
68 "ng cvs show} for\n} def\n\n/count-detail {\n /detail-total-count exch d"
69 "ef\n % if total-count >= one column, start at top of a column\n detail"
70 "-total-count lpp ge {\n % Start new page\n NextPage\n } {\n de"
71 "tail-total-count lpc ge {\n % Start new column\n NextColumn\n "
72 " } if\n } ifelse\n} def\n\n% highlight next entry with underbar\n/do-"
73 "flag {\ngsave\n setrgbcolor\n lmargin tmargin moveto\n next-line lpc "
74 "idiv delc mul next-line lpc mod dell mul rmoveto\n 0 -2 rmoveto\n pro"
75 "bw 0 rlineto\n 0 dell neg rlineto\n probw neg 0 rlineto\n closepath\n"
76 " fill\ngrestore\n} def\n\n/do-detail-e {\n /d-array exch def\n /d-enc"
77 " exch def\n /d-label exch def\n /d-max -999999 def\n\n lmargin tmargi"
78 "n moveto\n next-line lpc idiv delc mul next-line lpc mod dell mul rmov"
79 "eto\n 0.25 setlinewidth\n\n % show label, using encoding color\n gsav"
80 "e\n probw 2 add -2 rmoveto\n detail-count 1 sub 2 mod 0.25 inch mu"
81 "l 0 rmoveto\n % ([) show detail-count 20 string cvs show (] ) show\n "
82 " d-enc 0 lt {\n 0 setgray\n }{\n colors d-enc get 1 .8 se"
83 "thsbcolor\n } ifelse\n d-label show\n grestore\n % For -prune- d"
84 "raw horizontal line\n d-label length 8 gt {d-label 4 get (p) 0 get eq d"
85 "-label 5 get (r) 0 get eq and {\n /prune-val d-label cvi def\n /ne"
86 "wx prune-val 30 mul prob2x def\n gsave newx 6 rmoveto 0 -12 rlineto 1"
87 ".5 setlinewidth 0.8 setgray stroke grestore\n gsave probw 0 add 0 rli"
88 "neto 0.25 setlinewidth 0.8 setgray stroke grestore\n } if } if\n\n % t"
89 "rack max per new row\n 0 1 d-array length 1 sub {\n /i exch def\n "
90 " /sum sums i get d-array i get add def\n d-max sum lt {/d-max sum def"
91 "} if\n } for\n\n % draw line increments\n 0 1 d-array length 1 sub {\n"
92 " /i exch def\n detail-count 1 gt {\n /oldx old-d-max sums i g"
93 "et sub prob2x def\n } {\n /oldx 600 prob2x def\n } ifelse\n "
94 " /oldy dell neg def\n /newx d-max sums i get d-array i get add sub"
95 " prob2x def\n /newy 0 def\n gsave\n oldx oldy rmoveto\n newx"
96 " oldx sub newy oldy sub rlineto\n % if encoding is being tracked, ma"
97 "ke bold line\n i track-me eq\n {2 setlinewidth}\n {i track-"
98 "me2 eq {1.25 setlinewidth} {0.25 setlinewidth} ifelse}\n ifelse\n "
99 " colors i get 1 .8 sethsbcolor stroke\n grestore\n } for\n /detail"
100 "-count detail-count 1 add def\n\n % increment running total in sums, tr"
101 "ack max per row\n 0 1 d-array length 1 sub {\n /i exch def\n sums"
102 " i sums i get d-array i get add put\n } for\n /old-d-max d-max def\n"
103 "\n 1 IncrementLine\n} def\n\n\n/do-detail {\n /d-array exch def\n /d-"
104 "label exch def\n d-label -1 d-array do-detail-e\n} def\n\n% Upon exit, "
105 "we are outside the clip\n/end-detail {\n pop\n endcliptocolumn "
106 " % MUST match\n column-box\n\n % text labels\n 0 1 d-array length 1 s"
107 "ub {\n /i exch def\n gsave\n /newx old-d-max sums i get sub pro"
108 "b2x def\n newx 0 ge {\n newx 0 rmoveto\n currentpoint trans"
109 "late\n colors i get 1 .8 sethsbcolor\n gsave 0 dell neg rline"
110 "to 0.25 setlinewidth stroke grestore\n -60 rotate\n 0 -2 movet"
111 "o d-names i get show\n } if\n grestore\n } for\n d-array length "
112 "0 gt {\n lpg IncrementLineOutside\n } {\n lpg 4 idiv IncrementLin"
113 "eOutside\n } ifelse\n} def\n\n/do-src {\n/src exch def\n lmargin tmarg"
114 "in moveto\n next-line lpc idiv delc mul next-line lpc mod dell mul rmo"
115 "veto\n Cfont setfont\n src show\n Hfont setfont\n 1 IncrementLine\n}"
116 " def\n\n% Underline trigram in source text\n/do-highlight1 {\n /hl-colo"
117 "r exch def\n /hl-offset exch def\n /hl-line exch 1 sub 2 mul def\n gs"
118 "ave\n lmargin tmargin moveto\n next-line hl-line sub lpc idiv delc mul"
119 "\n next-line hl-line sub lpc mod dell mul rmoveto\n % Assume text is 6"
120 " chars in and 3.6 pts per char, but 2 chars per offset\n hl-offset 2 mu"
121 "l 6 add 3.6 mul 4 rmoveto\n\n 0 setgray 0.5 setlinewidth\n hl-color 1"
122 " eq {0 0 1 setrgbcolor} if % Latin1 blue\n hl-color 2 eq {1 0 1 setrgb"
123 "color} if % Latin2 magenta\n hl-color 3 eq {1 0.67 0 setrgbcolor} if "
124 "% Latin7 orange\n 18 -2 rlineto stroke\n grestore\n} def\n\n% Box trig"
125 "ram in source text\n/do-highlight2 {\n /hl-color exch def\n /hl-offset"
126 " exch def\n /hl-line exch 1 sub 2 mul def\n gsave\n lmargin tmargin m"
127 "oveto\n next-line hl-line sub lpc idiv delc mul\n next-line hl-line su"
128 "b lpc mod dell mul rmoveto\n % Assume text is 6 chars in and 3.6 pts pe"
129 "r char, but 2 chars per offset\n hl-offset 2 mul 6 add 3.6 mul 4 rmove"
130 "to\n\n 0 setgray 0.25 setlinewidth\n hl-color 1 eq {0 0 1 setrgbcolor}"
131 " if % Latin1 blue\n hl-color 2 eq {1 0 1 setrgbcolor} if % Latin2 mag"
132 "enta\n hl-color 3 eq {1 0.67 0 setrgbcolor} if % Latin7 orange\n -0.5"
133 " -0.5 rmoveto\n 22 0 rlineto\n 0 4 rlineto\n -11 2 rlineto\n -11 -2 "
134 "rlineto\n closepath\n stroke\n grestore\n} def\n\n/show-pageno {\ngsa"
135 "ve\nlmargin bmargin moveto 0 -12 rmoveto\n(Page ) show pageno 20 string "
136 "cvs show\ngrestore\n/pageno pageno 1 add def\n} def\n\n/pageno 1 def\nsh"
137 "ow-pageno\n%=============================\n\n\n"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698