summaryrefslogtreecommitdiff
path: root/macros/generic/diagrams/xypic/mfinputs/xybsql10.mf
blob: dfa7c9cbf9112a0333d3ed66a025857ae07a3fcc (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
% $Id: xybsql10.mf,v 3.10 2011/08/28 22:19:06 krisrose Exp $
%
% XYBSQL10: lower squiggles/quarter circles for Xy-pic at 10 point.
% Copyright (c) 1992-2011  Kristoffer H. Rose  <krisrose@tug.org>
%               2011  Daniel Müllner <http://math.stanford.edu/~muellner>
%
% This file is part of the Xy-pic macro package.
%
% The Xy-pic macro package is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or (at your
% option) any later version.
%
% The Xy-pic macro package is distributed in the hope that it will be
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
% Public License for more details.
%
% You should have received a copy of the GNU General Public License along
% with this macro package; if not, see http://www.gnu.org/licenses/.
%
% As a special exception, you may use this file and all files derived
% from it without restriction.  This special exception was added with
% version 3.7 of Xy-pic.
% _________________________________________________________________________
%
% CONTENTS: Squiggles are quarter circles with secant in all directions.
% Each has zero bounding box around the start point, i.e., from which the
% quarter circle `turns letf' ... this can be illustrated as follows:
%
% Code:    [-1]   15   31   47   63   79   95   111  127
%                                          _
%                                 |   )     |   /\
%           _o    o    o    o    o-   o     o     o   _o
%          |     (     |_    \/                      |
% _________________________________________________________________________
%
font_identifier "XYBSQL"; font_size 10pt#;
mode_setup;

% METANESS...
%
segl# = sqrt 2 * 1/4 designsize; define_pixels(segl);   % segment length
segx# = (sqrt 2 - 1)*segl#; define_pixels(segx);	% segment height
segw# = .4pt#; define_whole_blacker_pixels(segw);       % segment thickness
radius# = 1/4 designsize; define_pixels(radius);
%
% chartowards makes char cc with quarter circle that is secant to line
% from (0,0) to (dx,dy), turning left.
%
path arc;
arc = quartercircle scaled (2 radius + segw)
  & halfcircle rotated 90 scaled segw shifted (radius * up)
  & reverse quartercircle scaled (2 radius - segw)
  & halfcircle rotated 180 scaled segw shifted (radius * right)
  & cycle;

def chartowards(expr cc,dx,dy) =
  beginchar(cc,0,0,0);
    fill arc shifted (radius * left) rotated (angle(dx, dy)-135);
  endchar
enddef;

% GENERATE...
%
input xyd

bye.
%
% $Log: xybsql10.mf,v $
% Revision 3.10  2011/08/28 22:19:06  krisrose
% Font fix (stroke to outline) by Daniel.
%
% Revision 3.9  2010/06/10 18:45:50  krisrose
% Reference to GPL by URL.
%
% Revision 3.8  2010/04/16 06:06:52  krisrose
% Preparing for a new release...
%
% Revision 3.7  1999/02/16 15:12:50  krisrose
% Interim release (Y&Y fonts now free).
%
% Revision 3.3  1996/12/19 03:31:56  krisrose
% Maintenance release
%
% Revision 3.0  1995/07/07 20:14:21  kris
% Major release w/new User's Guide!
%
% Revision 2.13  1995/07/04  15:11:17  kris
% Ready to release v3?
%
% Revision 2.7  1992/12/14  01:41:26  kris
% Now uses xyd.mf.
%
% Based on obsolete xyqc10.mf [Revision 2.6  1992/06/24  01:23:34  kris]