| 1 |
% $Id: xydash10.mf,v 3.9 2010/06/10 18:45:50 krisrose Exp $ |
| 2 |
% |
| 3 |
% XYDASH10: dashes for Xy-pic 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 |
% 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: Line segments going segl# in all rightward directions...each |
| 27 |
% character has (width + italic correction) = cos(direction) * segl#. |
| 28 |
% _________________________________________________________________________ |
| 29 |
% |
| 30 |
% SETUP: |
| 31 |
% |
| 32 |
font_identifier "XYDASH"; font_size 10pt#; |
| 33 |
mode_setup; |
| 34 |
|
| 35 |
% METANESS... |
| 36 |
% |
| 37 |
segl# = 1/2 designsize; define_pixels(segl); % segment length |
| 38 |
segx# = 1/5 designsize; define_pixels(segx); % segment height |
| 39 |
segw# = .4pt#; define_whole_blacker_pixels(segw); % segment thickness |
| 40 |
% |
| 41 |
pickup pencircle scaled segw; char_pen := savepen; |
| 42 |
% |
| 43 |
% chartowards makes char cc with length segl line from (0,0) towards (dx,dy)... |
| 44 |
% |
| 45 |
def chartowards(expr cc,dx,dy) = |
| 46 |
beginchar(cc, abs(dx)*segl#, 0, 0); |
| 47 |
a := angle(dx,dy); |
| 48 |
z0 = (0,0); z1 = z0 + dir a scaled segl; |
| 49 |
pickup char_pen; draw z0--z1; |
| 50 |
charic := abs ((cosd a)*segl#) - charwd; |
| 51 |
penlabels(0,1); |
| 52 |
endchar |
| 53 |
enddef; |
| 54 |
|
| 55 |
% TESTING...we redefine openit because the characters extend far to the |
| 56 |
% left of the bounding box! |
| 57 |
% |
| 58 |
def openit = openwindow currentwindow |
| 59 |
from origin to (screen_cols,screen_rows) at (-200,300) enddef; |
| 60 |
|
| 61 |
% GENERATE... |
| 62 |
% |
| 63 |
input xyd2 |
| 64 |
|
| 65 |
bye. |
| 66 |
% |
| 67 |
% $Log: xydash10.mf,v $ |
| 68 |
% Revision 3.9 2010/06/10 18:45:50 krisrose |
| 69 |
% Reference to GPL by URL. |
| 70 |
% |
| 71 |
% Revision 3.8 2010/04/16 06:06:52 krisrose |
| 72 |
% Preparing for a new release... |
| 73 |
% |
| 74 |
% Revision 3.7 1999/02/16 15:12:50 krisrose |
| 75 |
% Interim release (Y&Y fonts now free). |
| 76 |
% |
| 77 |
% Revision 3.3 1996/12/19 03:31:56 krisrose |
| 78 |
% Maintenance release |
| 79 |
% |
| 80 |
% Revision 3.0 1995/07/07 20:14:21 kris |
| 81 |
% Major release w/new User's Guide! |
| 82 |
% |
| 83 |
% Revision 2.13 1995/07/04 15:11:17 kris |
| 84 |
% Ready to release v3? |
| 85 |
% |
| 86 |
% Revision 2.7 1992/12/14 01:41:26 kris |
| 87 |
% Now uses xyd2.mf. |
| 88 |
% |
| 89 |
% Based on obsolete xyline10.mf 2.1 1992/01/02 14:54:07 kris |