summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/textpath/textpathfigs.mp
blob: 8aed0b40216a039fc9f5bcec12d6fd96f391c4b4 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
input latexmp
setupLaTeXMP(preamblefile="textpathfigs");
input textpath

prologues := 0;

beginfig(1);
  draw textpath("Greetings from MetaPost!", fullcircle scaled 50bp, 0)
    withcolor (0.2,0.2,0.6);
endfig;


beginfig(2);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(3);
path p;
  p := reverse fullcircle rotated -90;
  draw textpathFont("\usefont{T1}{pzc}{m}{n}\huge", "Happy Birthday to",
    p scaled 400bp, 0.5) withcolor (1, 0.6, 0.2);
  draw textpathFont("\usefont{T1}{bch}{m}{n}\large", "Daisy Duck!",
    p scaled 350bp, 0.5) withcolor (0.9, 0.3, 0.1);
endfig;


beginfig(4);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  draw p withcolor .8white;
  draw textpathRaw("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(5);
path p;
  p := reverse halfcircle scaled 80bp;
  draw p withcolor .8white;
  draw textpathRaw("\LARGE$x^2+y^2=r^2$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(6);
path p;
  p := reverse halfcircle xscaled 150bp yscaled 80;
  draw p withcolor .8white;
  interim textpathShift := 7pt;
  draw textpathRaw("\Large$\frac{(x-u)^2}{a^2}+\frac{(y-v)^2}{b^2}=1$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;



beginfig(7);
path p;
string f;
  f := "\usefont{T1}{pzc}{m}{n}\Large";
  p := subpath (5.7,6.3) of fullcircle scaled 1400bp;
  draw p withcolor .8white;
  interim textpathRepeat := 3;
  interim textpathStretch := 0;
  interim textpathHSpace := 10pt;
  draw textpathFont(f, "Happy Birthday!", p, 0.5) withcolor (1, 0.6, 0.2);
endfig;


beginfig(8);
path p[];
string f;
  f := "\usefont{T1}{pzc}{m}{n}\Large";
  p1 := subpath (5.7,6.3) of fullcircle scaled 1400bp;
  p2 := p1 shifted (0bp,-30bp);
  draw p1 withcolor .8white;
  draw p2 withcolor .8white;
  interim textpathRepeat := 3;
  interim textpathStretch := 1;
  draw textpathFont(f, "Happy Birthday!", p1, 0.5) withcolor (1, 0.6, 0.2);
  draw textpathFont(f, "Happy Birthday!", p2, 0) withcolor (1, 0.6, 0.2);
endfig;


beginfig(9);
string f;
path p;
numeric r,h,w;
picture pic;
% Font Brush Script Italic is available on CTAN.
  f := "\usefont{T1}{pbsi}{xl}{n}\fontsize{2.1pt}{2.1pt}\selectfont";
  w := 210bp;
  h := .276w;
  r := .19h;
  p := (-.5w,0)--(-.5w,.5h-r)--quartercircle rotated -90 scaled (2r)
    shifted (-.5w,.5h)--(0,.5h);
  p := p--reverse p reflectedabout ((0,-1),(0,1));
  p := p--reverse p reflectedabout ((-1,0),(1,0))--cycle;
  draw p withpen pensquare scaled 3.5pt;
  interim textpathRepeat := 30;
  interim textpathShift := -.6pt;
  draw textpathFont(f, "Fa\ss' Dich kurz!", p, 0.5) withcolor white;
  label(textext
    ("\usefont{T1}{bfu}{mb}{n}\fontsize{22pt}{22pt}\selectfont Telephonzelle"),
    origin);% Bitstream Futura
endfig;


beginfig(10);
string f;
path p;
picture pic;
numeric lenp, lenpic, tb, k;
color daisy;
  daisy := (0.9, 0.3, 0.1);
  f := "\usefont{T1}{bch}{m}{n}\fontsize{48pt}{48pt}\selectfont";
  p := subpath (2.7,5.3) of reverse fullcircle rotated -90 scaled 120bp;
  draw p withcolor .8white;
  interim textpathAbsRotation := 1;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor daisy + 0.85(white-daisy);
  textpathAbsRotation := 0;
  interim textpathDebug := 2;
  pickup pencircle scaled .2bp;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor .6white;
  textpathDebug := 1;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor daisy;
  textpathDebug := 4;
  draw textpathFont(f, "Daisy", p, 0.5) withcolor .6white;
endfig;


beginfig(11);
string f, t;
path heart;
  f := "\usefont{T1}{pzc}{m}{it}\tiny";
  t := "Love";
  heart := halfcircle shifted (-0.5bp,0bp)..{dir-50}(0bp,-1.5bp);
  heart := heart--reverse heart reflectedabout ((0,0),(0,1))--cycle;
  heart := heart scaled 60bp;
  interim textpathRotation := 90;
  interim textpathLetterSpace := 1pt;
  interim textpathRepeat := 30;
  draw textpathFont(f, t, heart, 0.5) withcolor red+0.1green;
endfig;


beginfig(12);
path p;
string f, t;
picture pic;
  f := "\usefont{T1}{fwb}{m}{n}\Large";% From the emerald package
  t := "Don't panic!  Don't panic!  Don't panic!";
  p := origin
  for i:=1 upto 20: ..(i, sind(i*45)) endfor;
  p := p xscaled 20 yscaled 35;
  interim textpathRotation := 0;
  interim textpathAbsRotation := 1;
  interim textpathLetterSpace := 6pt;
  pic := textpathFont(f, t, p, 0);
  background := black;
  interim bboxmargin := 30bp;
  unfill bbox pic;
  draw pic withcolor red+green;
endfig;


beginfig(13);
path p;
  p := (origin--(1bp,0bp)) scaled 75bp;
  draw p withcolor .8white;
  interim textpathClip := 1;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
  p := p shifted (0,-20bp);
  draw p withcolor .8white;
  textpathClip := 0;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
  p := p shifted (0,-20bp);
  draw p withcolor .8white;
  interim textpathAutoScale := 1;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(14);
path p;
  interim textpathDraft := 1;
  p := (origin--(1bp,0bp)) scaled 75bp;
  draw p withcolor .8white;
  interim textpathClip := 1;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
  p := p shifted (0,-20bp);
  draw p withcolor .8white;
  textpathClip := 0;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
  p := p shifted (0,-20bp);
  draw p withcolor .8white;
  interim textpathAutoScale := 1;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(15);
path p;
  p := reverse halfcircle xscaled 150bp yscaled 80;
  draw p withcolor .8white;
  interim textpathShift := 9pt;
  interim textpathFancyStrokes := 0;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(16);
path p;
  p := reverse halfcircle xscaled 150bp yscaled 80;
  draw p withcolor .8white;
  interim textpathShift := 9pt;
  interim textpathFancyStrokes := 1;
  interim textpathCureSqrt := 0;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(17);
path p;
  p := reverse halfcircle xscaled 150bp yscaled 80;
  draw p withcolor .8white;
  interim textpathShift := 9pt;
  interim textpathFancyStrokes := 1;
  interim textpathCureSqrt := 1;
  draw textpathRaw("\Large$y = v+b\sqrt{1-\frac{(x-u)^2}{a^2}}$", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(18);
string f;
path p;
  f := "\usefont{T1}{pzc}{m}{it}\fontsize{56pt}{56pt}\selectfont";
  p := reverse fullcircle rotated 33 scaled 150bp;
  interim textpathLetterSpace := -3pt;
  draw textpathFont(f, "Pro \&", p, 1) withcolor (1, 0.6, 0.2);
  interim textpathLetterSpace := 0pt;
  f := "\usefont{T1}{pzc}{m}{it}\fontsize{48pt}{48pt}\selectfont";
  p := fullcircle rotated 33 scaled 145bp;
  draw textpathFont(f, "Con\<{\kern-2pt}tra", p, 0.0) withcolor (1, 0.6, 0.2);
endfig;


beginfig(19);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  interim textpathDebug := 1 + 2;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


beginfig(20);
path p;
  p := reverse fullcircle rotated -90 scaled 50bp;
  interim textpathDebug := 2 + 4;
  draw textpath("Greetings from MetaPost!", p, 0.5) withcolor (0.2,0.2,0.6);
endfig;


end