Debian Codegraph @

texmf-dist/fonts/source/public/xypic/xybtip.mf

raw
1 % $Id: xybtip.mf,v 3.8 2010/06/10 18:45:50 krisrose Exp $
2 %
3 % Generate lower arrow tips for Xy-pic.
4 % Copyright (c) 1994-1996 Kristoffer H. Rose <[email protected]>
5 %
6 % This file is part of the Xy-pic macro package.
7 %
8 % The Xy-pic macro package is free software; you can redistribute it and/or
9 % modify it under the terms of the GNU General Public License as published by
10 % the Free Software Foundation; either version 2 of the License, or (at your
11 % option) any later version.
12 %
13 % The Xy-pic macro package is distributed in the hope that it will be
14 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 % Public License for more details.
17 %
18 % You should have received a copy of the GNU General Public License along
19 % with this macro package; if not, see http://www.gnu.org/licenses/.
20 %
21 % As a special exception, you may use this file and all files derived
22 % from it without restriction. This special exception was added with
23 % version 3.7 of Xy-pic.
24 % _________________________________________________________________________
25 %
26 % CONTENTS: Arrow tips *pointing* in all directions. With zero bounding box
27 % placed at the tip; note most of the ink goes on the opposite side of where
28 % the tip points.
29 %
30 % Generates the half of the tip that is lower when pointing right.
31 % _________________________________________________________________________
32 %
33 pickup pencircle scaled segw; char_pen := savepen;
34 %
35 % chartowards makes char cc a tip pointing towards (dx,dy)...
36 %
37 def chartowards(expr cc,dx,dy) =
38 beginchar(cc,0,0,0);
39 a := angle(dx,dy);
40 z0 = (tipo,0) rotated a; % tip of tip
41 z1 = (-segl,0) rotated a; % center of tail
42 z2 = (-segl,-1/2 segx) rotated a; % tail ends
43 z3 = curvature [z1,z2] ; % tail directions
44 pickup char_pen; draw z2..{-z3}z0;
45 penlabels(0,1,2,3);
46 endchar
47 enddef;
48
49 % TESTING...we redefine openit because the characters extend far to the
50 % left of the bounding box!
51 %
52 def openit = openwindow currentwindow
53 from origin to (screen_cols,screen_rows) at (-200,300) enddef;
54
55 % GENERATE...
56 %
57 input xyd
58
59 bye.
60 %
61 % $Log: xybtip.mf,v $
62 % Revision 3.8 2010/06/10 18:45:50 krisrose
63 % Reference to GPL by URL.
64 %
65 % Revision 3.7 1999/02/16 15:12:50 krisrose
66 % Interim release (Y&Y fonts now free).
67 %
68 % Revision 3.3 1996/12/19 04:05:28 krisrose
69 % New for this maintenance release.
70 %
71 % Based on xybtip10.mf,v 3.0 1995/07/07 20:14:21 kris Exp