~ubuntu-branches/ubuntu/gutsy/plotutils/gutsy

« back to all changes in this revision

Viewing changes to libplot/g_relative.c

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2007-05-10 19:48:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070510194854-mrr3lgwzpxd8hovo
Tags: 2.5-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the GNU plotutils package.  Copyright (C) 1995,
 
2
   1996, 1997, 1998, 1999, 2000, 2005, Free Software Foundation, Inc.
 
3
 
 
4
   The GNU plotutils package is free software.  You may redistribute it
 
5
   and/or modify it under the terms of the GNU General Public License as
 
6
   published by the Free Software foundation; either version 2, or (at your
 
7
   option) any later version.
 
8
 
 
9
   The GNU plotutils package is distributed in the hope that it will be
 
10
   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU General Public License along
 
15
   with the GNU plotutils package; see the file COPYING.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
 
17
   Boston, MA 02110-1301, USA. */
 
18
 
1
19
/* This file contains the libplot methods that take floating-point relative
2
20
   coordinates as arguments. */
3
21
 
5
23
#include "extern.h"
6
24
 
7
25
int
8
 
#ifdef _HAVE_PROTOS
9
26
_API_farcrel (R___(Plotter *_plotter) double dxc, double dyc, double dx0, double dy0, double dx1, double dy1)
10
 
#else
11
 
_API_farcrel (R___(_plotter) dxc, dyc, dx0, dy0, dx1, dy1)
12
 
     S___(Plotter *_plotter;)
13
 
     double dxc, dyc, dx0, dy0, dx1, dy1;
14
 
#endif
15
27
{
16
28
  return _API_farc (R___(_plotter) 
17
29
                    _plotter->drawstate->pos.x + dxc, 
23
35
}
24
36
 
25
37
int
26
 
#ifdef _HAVE_PROTOS
27
38
_API_fbezier2rel (R___(Plotter *_plotter) double dxc, double dyc, double dx0, double dy0, double dx1, double dy1)
28
 
#else
29
 
_API_fbezier2rel (R___(_plotter) dxc, dyc, dx0, dy0, dx1, dy1)
30
 
     S___(Plotter *_plotter;)
31
 
     double dxc, dyc, dx0, dy0, dx1, dy1;
32
 
#endif
33
39
{
34
40
  return _API_fbezier2 (R___(_plotter) 
35
41
                        _plotter->drawstate->pos.x + dxc, 
41
47
}
42
48
 
43
49
int
44
 
#ifdef _HAVE_PROTOS
45
50
_API_fbezier3rel (R___(Plotter *_plotter) double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
46
 
#else
47
 
_API_fbezier3rel (R___(_plotter) dx0, dy0, dx1, dy1, dx2, dy2, dx3, dy3)
48
 
     S___(Plotter *_plotter;)
49
 
     double dx0, dy0, dx1, dy1, dx2, dy2, dx3, dy3;
50
 
#endif
51
51
{
52
52
  return _API_fbezier3 (R___(_plotter) 
53
53
                        _plotter->drawstate->pos.x + dx0, 
61
61
}
62
62
 
63
63
int
64
 
#ifdef _HAVE_PROTOS
65
64
_API_fellarcrel (R___(Plotter *_plotter) double dxc, double dyc, double dx0, double dy0, double dx1, double dy1)
66
 
#else
67
 
_API_fellarcrel (R___(_plotter) dxc, dyc, dx0, dy0, dx1, dy1)
68
 
     S___(Plotter *_plotter;)
69
 
     double dxc, dyc, dx0, dy0, dx1, dy1;
70
 
#endif
71
65
{
72
66
  return _API_fellarc (R___(_plotter) 
73
67
                       _plotter->drawstate->pos.x + dxc, 
79
73
}
80
74
 
81
75
int
82
 
#ifdef _HAVE_PROTOS
83
76
_API_fboxrel (R___(Plotter *_plotter) double dx0, double dy0, double dx1, double dy1)
84
 
#else
85
 
_API_fboxrel (R___(_plotter) dx0, dy0, dx1, dy1)
86
 
     S___(Plotter *_plotter;)
87
 
     double dx0, dy0, dx1, dy1;
88
 
#endif
89
77
{
90
78
  return _API_fbox (R___(_plotter) 
91
79
                    _plotter->drawstate->pos.x + dx0, 
95
83
}
96
84
 
97
85
int
98
 
#ifdef _HAVE_PROTOS
99
86
_API_fcirclerel (R___(Plotter *_plotter) double dx, double dy, double r)
100
 
#else
101
 
_API_fcirclerel (R___(_plotter) dx, dy, r)
102
 
     S___(Plotter *_plotter;)
103
 
     double dx, dy, r;
104
 
#endif
105
87
{
106
88
  return _API_fcircle (R___(_plotter) 
107
89
                       _plotter->drawstate->pos.x + dx, 
109
91
}
110
92
 
111
93
int
112
 
#ifdef _HAVE_PROTOS
113
94
_API_fellipserel (R___(Plotter *_plotter) double dx, double dy, double rx, double ry, double angle)
114
 
#else
115
 
_API_fellipserel (R___(_plotter) dx, dy, rx, ry, angle)
116
 
     S___(Plotter *_plotter;)
117
 
     double dx, dy, rx, ry, angle;
118
 
#endif
119
95
{
120
96
  return _API_fellipse (R___(_plotter) 
121
97
                        _plotter->drawstate->pos.x + dx, 
124
100
}
125
101
 
126
102
int
127
 
#ifdef _HAVE_PROTOS
128
103
_API_fcontrel (R___(Plotter *_plotter) double dx, double dy)
129
 
#else
130
 
_API_fcontrel (R___(_plotter) dx, dy)
131
 
     S___(Plotter *_plotter;)
132
 
     double dx, dy;
133
 
#endif
134
104
{
135
105
  return _API_fcont (R___(_plotter) 
136
106
                     _plotter->drawstate->pos.x + dx, 
138
108
}
139
109
 
140
110
int
141
 
#ifdef _HAVE_PROTOS
142
111
_API_flinerel (R___(Plotter *_plotter) double dx0, double dy0, double dx1, double dy1)
143
 
#else
144
 
_API_flinerel (R___(_plotter) dx0, dy0, dx1, dy1)
145
 
     S___(Plotter *_plotter;)
146
 
     double dx0, dy0, dx1, dy1;
147
 
#endif
148
112
{
149
113
  return _API_fline (R___(_plotter) 
150
114
                     _plotter->drawstate->pos.x + dx0, 
154
118
}
155
119
 
156
120
int
157
 
#ifdef _HAVE_PROTOS
158
121
_API_fmarkerrel (R___(Plotter *_plotter) double dx, double dy, int type, double size)
159
 
#else
160
 
_API_fmarkerrel (R___(_plotter) dx, dy, type, size)
161
 
     S___(Plotter *_plotter;)
162
 
     double dx, dy;
163
 
     int type;
164
 
     double size;
165
 
#endif
166
122
{
167
123
  return _API_fmarker (R___(_plotter) 
168
124
                       _plotter->drawstate->pos.x + dx, 
171
127
}
172
128
 
173
129
int
174
 
#ifdef _HAVE_PROTOS
175
130
_API_fmoverel (R___(Plotter *_plotter) double x, double y)
176
 
#else
177
 
_API_fmoverel (R___(_plotter) x, y)
178
 
     S___(Plotter *_plotter;)
179
 
     double x, y;
180
 
#endif
181
131
{
182
132
  return _API_fmove (R___(_plotter) 
183
133
                     _plotter->drawstate->pos.x + x, 
185
135
}
186
136
 
187
137
int
188
 
#ifdef _HAVE_PROTOS
189
138
_API_fpointrel (R___(Plotter *_plotter) double dx, double dy)
190
 
#else
191
 
_API_fpointrel (R___(_plotter) dx, dy)
192
 
     S___(Plotter *_plotter;)
193
 
     double dx, dy;
194
 
#endif
195
139
{
196
140
  return _API_fpoint (R___(_plotter) 
197
141
                      _plotter->drawstate->pos.x + dx,