| 1 |
% $Id: xyline10.mf,v 3.5 2010/06/10 18:45:50 krisrose Exp $ -*-tex-*- |
| 2 |
% |
| 3 |
% XYLINE10: line segments for XY mode at 10 point. |
| 4 |
% Copyright (c) 1991,1992 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 |
% CONTENTS: Line segments going either segl# down or to the right. Codes |
| 22 |
% range from 0 to 127, distributed evenly in each of the |
| 23 |
% intervals between the `purely' horizontal/ |
| 24 |
% vertical/diagonal characters with code 31, ..../ |
| 25 |
% 63, 95, and 127 (code -1 would be pure as : /: |
| 26 |
% well if it existed): : / : |
| 27 |
% :/ : |
| 28 |
% ..../ ..../ | o o.... o.... o---- o...: |
| 29 |
% : /: : /: | | :\ : :\ : |
| 30 |
% : / : : / : | | : \ : : \ : |
| 31 |
% :/ : :/ : | | : \: : \: |
| 32 |
% o...: o...: o | :...\ :...\ |
| 33 |
% |
| 34 |
% Code: [-1] 0 30 31 63 64 95 127 |
| 35 |
% |
| 36 |
font_identifier "XYLINE"; font_size 10pt#; |
| 37 |
font_coding_scheme:="XY line segments"; |
| 38 |
mode_setup; |
| 39 |
|
| 40 |
% METANESS... |
| 41 |
% |
| 42 |
segl# = 1/2 designsize; define_pixels(segl); % line segment length |
| 43 |
rulew# = .4pt#; define_whole_blacker_pixels(rulew); % line thickness |
| 44 |
% |
| 45 |
% drawsegment draws a line from (0,0) to the argument point... |
| 46 |
def drawsegment expr endpoint = |
| 47 |
z0 = (0,0); z1 = endpoint; |
| 48 |
pickup pencircle scaled rulew rotated (angle (z1-z0) - 90); |
| 49 |
draw z0--z1; penlabels(0,1) enddef; |
| 50 |
|
| 51 |
% TESTING...we redefine openit because the characters extend far to the |
| 52 |
% left of the bounding box! |
| 53 |
% |
| 54 |
def openit = openwindow currentwindow |
| 55 |
from origin to (screen_cols,screen_rows) at (-200,300) enddef; |
| 56 |
|
| 57 |
% FONT. |
| 58 |
% |
| 59 |
% Font dimension 8 is the rule thickness (cf. The TeXbook, app.G) |
| 60 |
fontdimen 8: rulew#; |
| 61 |
% |
| 62 |
% The characters follow... |
| 63 |
% |
| 64 |
for cc = 0 step 1 until 30: |
| 65 |
beginchar(cc,(31-cc)/32*segl#,segl#,0); drawsegment (w,h); endchar; |
| 66 |
endfor; |
| 67 |
% |
| 68 |
for cc = 31 step 1 until 63: |
| 69 |
beginchar(cc,(cc-31)/32*segl#,0,segl#); drawsegment (w,-d); endchar; |
| 70 |
endfor; |
| 71 |
% |
| 72 |
for cc = 64 step 1 until 94: |
| 73 |
beginchar(cc,segl#,0,(95-cc)/32*segl#); drawsegment (w,-d); endchar; |
| 74 |
endfor; |
| 75 |
% |
| 76 |
for cc = 95 step 1 until 126: |
| 77 |
beginchar(cc,segl#,(cc-95)/32*segl#,0); drawsegment (w,h); endchar; |
| 78 |
endfor; |
| 79 |
% |
| 80 |
beginchar(127,segl#,segl#,0); drawsegment (w,h); endchar; |
| 81 |
|
| 82 |
bye. |
| 83 |
% |
| 84 |
% $Log: xyline10.mf,v $ |
| 85 |
% Revision 3.5 2010/06/10 18:45:50 krisrose |
| 86 |
% Reference to GPL by URL. |
| 87 |
% |
| 88 |
% Revision 3.4 2010/04/16 06:06:52 krisrose |
| 89 |
% Preparing for a new release... |
| 90 |
% |
| 91 |
% Revision 3.3 1996/12/19 03:31:56 krisrose |
| 92 |
% Maintenance release |
| 93 |
% |
| 94 |
% Revision 3.0 1995/07/07 20:14:21 kris |
| 95 |
% Major release w/new User's Guide! |
| 96 |
% |
| 97 |
% Revision 2.1 1992/01/02 14:54:07 kris |
| 98 |
% Release version. |
| 99 |
% |
| 100 |
% Revision 1.7 1991/12/17 04:51:16 kris |
| 101 |
% Version distributed with `final draft' on Usenet. |
| 102 |
% |
| 103 |
% Revision 1.6 1991/11/27 06:54:21 kris |
| 104 |
% \beta-test on DIKU. |
| 105 |
% |
| 106 |
% Revision 1.5 1991/10/21 23:19:08 kris |
| 107 |
% Version described in DIKU student report 91-7-10. |
| 108 |
% |
| 109 |
% Revision 1.4 1991/07/28 22:16:18 kris |
| 110 |
% Inverted char0..30 to avoid negative widths. |
| 111 |
% |
| 112 |
% Revision 1.3 1991/07/26 01:22:28 kris |
| 113 |
% Set bounding box completely! |
| 114 |
% |
| 115 |
% Revision 1.2 91/06/09 21:59:49 kris |
| 116 |
% separated METANESS and CHARACTERS |
| 117 |
% |
| 118 |
% Revision 1.1 91/06/06 22:52:31 kris |
| 119 |
% furst succesful attempt |