tioga 1.6 → 1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/Tioga_README +35 -10
  2. data/split/Dvector/dvector.c +264 -22
  3. data/split/Dvector/lib/Dvector_extras.rb +30 -2
  4. data/split/Flate/extconf.rb +1 -1
  5. data/split/Function/function.c +112 -2
  6. data/split/Tioga/figures.c +76 -77
  7. data/split/Tioga/figures.h +375 -490
  8. data/split/Tioga/generic.c +254 -0
  9. data/split/Tioga/generic.h +236 -0
  10. data/split/Tioga/init.c +434 -320
  11. data/split/Tioga/lib/Creating_Paths.rb +11 -1
  12. data/split/Tioga/lib/FigMkr.rb +263 -65
  13. data/split/Tioga/lib/Legends.rb +4 -2
  14. data/split/Tioga/lib/Markers.rb +3 -2
  15. data/split/Tioga/lib/Special_Paths.rb +22 -23
  16. data/split/Tioga/lib/TeX_Text.rb +79 -1
  17. data/split/Tioga/lib/TexPreamble.rb +14 -0
  18. data/split/Tioga/lib/Utils.rb +5 -1
  19. data/split/Tioga/pdfs.h +7 -45
  20. data/split/Tioga/{axes.c → shared/axes.c} +210 -197
  21. data/split/Tioga/{makers.c → shared/makers.c} +442 -211
  22. data/split/Tioga/{pdf_font_dicts.c → shared/pdf_font_dicts.c} +0 -0
  23. data/split/Tioga/shared/pdfcolor.c +628 -0
  24. data/split/Tioga/shared/pdfcoords.c +443 -0
  25. data/split/Tioga/{pdffile.c → shared/pdffile.c} +56 -52
  26. data/split/Tioga/{pdfimage.c → shared/pdfimage.c} +103 -211
  27. data/split/Tioga/shared/pdfpath.c +766 -0
  28. data/split/Tioga/{pdftext.c → shared/pdftext.c} +121 -99
  29. data/split/Tioga/shared/texout.c +524 -0
  30. data/split/Tioga/wrappers.c +489 -0
  31. data/split/Tioga/wrappers.h +259 -0
  32. data/split/extconf.rb +4 -0
  33. data/split/mkmf2.rb +12 -1
  34. data/tests/benchmark_dvector_reads.rb +112 -0
  35. data/tests/tc_Dvector.rb +35 -3
  36. data/tests/tc_Function.rb +32 -0
  37. metadata +65 -52
  38. data/split/Tioga/pdfcolor.c +0 -486
  39. data/split/Tioga/pdfcoords.c +0 -523
  40. data/split/Tioga/pdfpath.c +0 -913
  41. data/split/Tioga/texout.c +0 -380
@@ -0,0 +1,489 @@
1
+ /* wrappers.c */
2
+ /*
3
+ Copyright (C) 2007 Bill Paxton
4
+
5
+ This file is part of Tioga.
6
+
7
+ Tioga is free software; you can redistribute it and/or modify
8
+ it under the terms of the GNU General Library Public License as published
9
+ by the Free Software Foundation; either version 2 of the License, or
10
+ (at your option) any later version.
11
+
12
+ Tioga is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Library General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Library General Public License
18
+ along with Tioga; if not, write to the Free Software
19
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
+ */
21
+
22
+ #include "figures.h"
23
+ #include "pdfs.h"
24
+ #include "generic.h"
25
+
26
+
27
+ // This file has the wrappers for ruby Tioga
28
+
29
+
30
+ // axes.c
31
+ OBJ_PTR FM_show_axis(OBJ_PTR fmkr, OBJ_PTR loc) { int ierr=0;
32
+ c_show_axis(fmkr, Get_FM(fmkr, &ierr), Number_to_int(loc, &ierr), &ierr); RETURN_NIL; }
33
+ OBJ_PTR FM_show_edge(OBJ_PTR fmkr, OBJ_PTR loc) { int ierr=0;
34
+ c_show_edge(fmkr, Get_FM(fmkr, &ierr), Number_to_int(loc, &ierr), &ierr); RETURN_NIL; }
35
+ OBJ_PTR FM_no_title(OBJ_PTR fmkr) { int ierr=0; c_no_title(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
36
+ OBJ_PTR FM_no_xlabel(OBJ_PTR fmkr) { int ierr=0; c_no_xlabel(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
37
+ OBJ_PTR FM_no_ylabel(OBJ_PTR fmkr) { int ierr=0; c_no_ylabel(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
38
+ OBJ_PTR FM_no_xaxis(OBJ_PTR fmkr) { int ierr=0; c_no_xaxis(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
39
+ OBJ_PTR FM_no_yaxis(OBJ_PTR fmkr) { int ierr=0; c_no_yaxis(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
40
+ OBJ_PTR FM_no_left_edge(OBJ_PTR fmkr) { int ierr=0; c_no_left_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
41
+ OBJ_PTR FM_no_right_edge(OBJ_PTR fmkr) { int ierr=0; c_no_right_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
42
+ OBJ_PTR FM_no_top_edge(OBJ_PTR fmkr) { int ierr=0; c_no_top_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
43
+ OBJ_PTR FM_no_bottom_edge(OBJ_PTR fmkr) { int ierr=0; c_no_bottom_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL;}
44
+
45
+ // init.c
46
+ OBJ_PTR FM_private_init_fm_data(OBJ_PTR fmkr) { int ierr=0;
47
+ c_private_init_fm_data(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
48
+ OBJ_PTR FM_set_frame_sides(OBJ_PTR fmkr, OBJ_PTR left, OBJ_PTR right, OBJ_PTR top, OBJ_PTR bottom) { int ierr=0;
49
+ c_set_frame_sides(fmkr, Get_FM(fmkr, &ierr),
50
+ Number_to_double(left, &ierr), Number_to_double(right, &ierr),
51
+ Number_to_double(top, &ierr), Number_to_double(bottom, &ierr), &ierr); RETURN_NIL;}
52
+ OBJ_PTR FM_set_device_pagesize(OBJ_PTR fmkr, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
53
+ c_set_device_pagesize(fmkr, Get_FM(fmkr, &ierr), Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr); RETURN_NIL;}
54
+ OBJ_PTR FM_get_save_filename(OBJ_PTR fmkr, OBJ_PTR name) { int ierr=0;
55
+ return c_get_save_filename(fmkr, Get_FM(fmkr, &ierr), name, &ierr); }
56
+ OBJ_PTR FM_private_make(OBJ_PTR fmkr, OBJ_PTR name, OBJ_PTR cmd) { int ierr=0;
57
+ c_private_make(fmkr, Get_FM(fmkr, &ierr), name, cmd, &ierr); RETURN_NIL; }
58
+ OBJ_PTR FM_private_make_portfolio(OBJ_PTR fmkr, OBJ_PTR name, OBJ_PTR fignums, OBJ_PTR fignames) { int ierr=0;
59
+ c_private_make_portfolio(fmkr, Get_FM(fmkr, &ierr), name, fignums, fignames, &ierr); RETURN_NIL; }
60
+
61
+ // makers.c
62
+ OBJ_PTR FM_private_make_contour(OBJ_PTR fmkr, OBJ_PTR gaps,
63
+ OBJ_PTR xs, OBJ_PTR ys, OBJ_PTR zs, OBJ_PTR z_level, OBJ_PTR legit, OBJ_PTR method) { int ierr=0;
64
+ return c_private_make_contour(fmkr, Get_FM(fmkr, &ierr), gaps, xs, ys, zs, Number_to_double(z_level, &ierr),
65
+ legit, Number_to_int(method, &ierr), &ierr); }
66
+ OBJ_PTR FM_private_make_steps(OBJ_PTR fmkr, OBJ_PTR Xvec_data, OBJ_PTR Yvec_data,
67
+ OBJ_PTR xfirst, OBJ_PTR yfirst, OBJ_PTR xlast, OBJ_PTR ylast) { int ierr=0;
68
+ return c_private_make_steps(fmkr, Get_FM(fmkr, &ierr), Xvec_data, Yvec_data,
69
+ Number_to_double(xfirst, &ierr), Number_to_double(yfirst, &ierr),
70
+ Number_to_double(xlast, &ierr), Number_to_double(ylast, &ierr),
71
+ CENTERED, /* by default, CENTERED */
72
+ &ierr); }
73
+ OBJ_PTR FM_private_make_spline_interpolated_points(OBJ_PTR fmkr,
74
+ OBJ_PTR Xvec, OBJ_PTR Xvec_data, OBJ_PTR Yvec_data,
75
+ OBJ_PTR start_slope, OBJ_PTR end_slope) { int ierr=0;
76
+ return c_private_make_spline_interpolated_points(fmkr, Get_FM(fmkr, &ierr),
77
+ Xvec, Xvec_data, Yvec_data, start_slope, end_slope, &ierr); }
78
+
79
+ // pdfcolor.c
80
+ OBJ_PTR FM_stroke_opacity_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
81
+ c_stroke_opacity_set(fmkr, Get_FM(fmkr, &ierr), Number_to_double(val, &ierr), &ierr); RETURN_NIL; }
82
+ OBJ_PTR FM_fill_opacity_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
83
+ c_fill_opacity_set(fmkr, Get_FM(fmkr, &ierr), Number_to_double(val, &ierr), &ierr); RETURN_NIL; }
84
+ OBJ_PTR FM_private_axial_shading(
85
+ OBJ_PTR fmkr, OBJ_PTR x0, OBJ_PTR y0, OBJ_PTR x1, OBJ_PTR y1,
86
+ OBJ_PTR colormap, OBJ_PTR extend_start, OBJ_PTR extend_end) { int ierr=0;
87
+ c_private_axial_shading(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x0, &ierr), Number_to_double(y0, &ierr),
88
+ Number_to_double(x1, &ierr), Number_to_double(y1, &ierr), colormap,
89
+ extend_start == OBJ_TRUE, extend_end == OBJ_TRUE, &ierr); RETURN_NIL; }
90
+ OBJ_PTR FM_private_radial_shading(OBJ_PTR fmkr,
91
+ OBJ_PTR x0, OBJ_PTR y0, OBJ_PTR r0,
92
+ OBJ_PTR x1, OBJ_PTR y1, OBJ_PTR r1, OBJ_PTR colormap,
93
+ OBJ_PTR a, OBJ_PTR b, OBJ_PTR c, OBJ_PTR d, OBJ_PTR extend_start, OBJ_PTR extend_end) { int ierr=0;
94
+ c_private_radial_shading(fmkr, Get_FM(fmkr, &ierr),
95
+ Number_to_double(x0, &ierr), Number_to_double(y0, &ierr), Number_to_double(r0, &ierr),
96
+ Number_to_double(x1, &ierr), Number_to_double(y1, &ierr), Number_to_double(r1, &ierr), colormap,
97
+ Number_to_double(a, &ierr), Number_to_double(b, &ierr), Number_to_double(c, &ierr), Number_to_double(d, &ierr),
98
+ extend_start == OBJ_TRUE, extend_end == OBJ_TRUE, &ierr); RETURN_NIL; }
99
+ OBJ_PTR FM_private_create_colormap(OBJ_PTR fmkr, OBJ_PTR rgb_flag,
100
+ OBJ_PTR length, OBJ_PTR Ps, OBJ_PTR C1s, OBJ_PTR C2s, OBJ_PTR C3s) { int ierr=0;
101
+ return c_private_create_colormap(fmkr, Get_FM(fmkr, &ierr), rgb_flag != OBJ_FALSE, Number_to_int(length, &ierr), Ps, C1s, C2s, C3s, &ierr); }
102
+ OBJ_PTR FM_get_color_from_colormap(OBJ_PTR fmkr, OBJ_PTR color_map, OBJ_PTR color_position) { int ierr=0;
103
+ return c_get_color_from_colormap(fmkr, Get_FM(fmkr, &ierr), color_map, Number_to_double(color_position, &ierr), &ierr); }
104
+ OBJ_PTR FM_convert_to_colormap(OBJ_PTR fmkr, OBJ_PTR Rs, OBJ_PTR Gs, OBJ_PTR Bs) { int ierr=0;
105
+ return c_convert_to_colormap(fmkr, Get_FM(fmkr, &ierr), Rs, Gs, Bs, &ierr); }
106
+ OBJ_PTR FM_hls_to_rgb(OBJ_PTR fmkr, OBJ_PTR hls_vec) { int ierr=0;
107
+ return c_hls_to_rgb(fmkr, Get_FM(fmkr, &ierr), hls_vec, &ierr); }
108
+ OBJ_PTR FM_rgb_to_hls(OBJ_PTR fmkr, OBJ_PTR rgb_vec) { int ierr=0;
109
+ return c_rgb_to_hls(fmkr, Get_FM(fmkr, &ierr), rgb_vec, &ierr); }
110
+ OBJ_PTR FM_title_color_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
111
+ c_title_color_set(fmkr, Get_FM(fmkr, &ierr), val, &ierr); RETURN_NIL; }
112
+ OBJ_PTR FM_title_color_get(OBJ_PTR fmkr) { int ierr=0;
113
+ return c_title_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
114
+ OBJ_PTR FM_xlabel_color_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
115
+ c_xlabel_color_set(fmkr, Get_FM(fmkr, &ierr), val, &ierr); RETURN_NIL; }
116
+ OBJ_PTR FM_xlabel_color_get(OBJ_PTR fmkr) { int ierr=0;
117
+ return c_xlabel_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
118
+ OBJ_PTR FM_ylabel_color_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
119
+ c_ylabel_color_set(fmkr, Get_FM(fmkr, &ierr), val, &ierr); RETURN_NIL; }
120
+ OBJ_PTR FM_ylabel_color_get(OBJ_PTR fmkr) { int ierr=0;
121
+ return c_ylabel_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
122
+ OBJ_PTR FM_xaxis_stroke_color_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
123
+ c_xaxis_stroke_color_set(fmkr, Get_FM(fmkr, &ierr), val, &ierr); RETURN_NIL; }
124
+ OBJ_PTR FM_xaxis_stroke_color_get(OBJ_PTR fmkr) { int ierr=0;
125
+ return c_xaxis_stroke_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
126
+ OBJ_PTR FM_yaxis_stroke_color_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
127
+ c_yaxis_stroke_color_set(fmkr, Get_FM(fmkr, &ierr), val, &ierr); RETURN_NIL; }
128
+ OBJ_PTR FM_yaxis_stroke_color_get(OBJ_PTR fmkr) { int ierr=0;
129
+ return c_yaxis_stroke_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
130
+
131
+ // pdfcoords.c
132
+ OBJ_PTR FM_private_set_subframe(OBJ_PTR fmkr, OBJ_PTR left_margin, OBJ_PTR right_margin,
133
+ OBJ_PTR top_margin, OBJ_PTR bottom_margin) { int ierr=0;
134
+ c_set_subframe(fmkr, Get_FM(fmkr, &ierr), Number_to_double(left_margin, &ierr), Number_to_double(right_margin, &ierr),
135
+ Number_to_double(top_margin, &ierr), Number_to_double(bottom_margin, &ierr), &ierr); RETURN_NIL; }
136
+ OBJ_PTR FM_private_set_default_font_size(OBJ_PTR fmkr, OBJ_PTR size) { int ierr=0;
137
+ c_private_set_default_font_size(fmkr, Get_FM(fmkr, &ierr), Number_to_double(size, &ierr), &ierr); RETURN_NIL; }
138
+ OBJ_PTR FM_convert_to_degrees(OBJ_PTR fmkr, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
139
+ return c_convert_to_degrees(fmkr, Get_FM(fmkr, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr); }
140
+ OBJ_PTR FM_convert_inches_to_output(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
141
+ return c_convert_inches_to_output(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
142
+ OBJ_PTR FM_convert_output_to_inches(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
143
+ return c_convert_output_to_inches(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
144
+ OBJ_PTR FM_convert_mm_to_output(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
145
+ return c_convert_mm_to_output(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
146
+ OBJ_PTR FM_convert_output_to_mm(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
147
+ return c_convert_output_to_mm(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
148
+ OBJ_PTR FM_convert_page_to_output_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
149
+ return c_convert_page_to_output_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
150
+ OBJ_PTR FM_convert_page_to_output_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
151
+ return c_convert_page_to_output_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
152
+ OBJ_PTR FM_convert_page_to_output_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
153
+ return c_convert_page_to_output_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
154
+ OBJ_PTR FM_convert_page_to_output_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
155
+ return c_convert_page_to_output_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
156
+ OBJ_PTR FM_convert_output_to_page_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
157
+ return c_convert_output_to_page_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
158
+ OBJ_PTR FM_convert_output_to_page_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
159
+ return c_convert_output_to_page_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
160
+ OBJ_PTR FM_convert_output_to_page_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
161
+ return c_convert_output_to_page_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
162
+ OBJ_PTR FM_convert_output_to_page_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
163
+ return c_convert_output_to_page_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
164
+ OBJ_PTR FM_convert_frame_to_page_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
165
+ return c_convert_frame_to_page_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
166
+ OBJ_PTR FM_convert_frame_to_page_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
167
+ return c_convert_frame_to_page_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
168
+ OBJ_PTR FM_convert_frame_to_page_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
169
+ return c_convert_frame_to_page_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
170
+ OBJ_PTR FM_convert_frame_to_page_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
171
+ return c_convert_frame_to_page_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
172
+ OBJ_PTR FM_convert_page_to_frame_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
173
+ return c_convert_page_to_frame_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
174
+ OBJ_PTR FM_convert_page_to_frame_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
175
+ return c_convert_page_to_frame_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
176
+ OBJ_PTR FM_convert_page_to_frame_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
177
+ return c_convert_page_to_frame_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
178
+ OBJ_PTR FM_convert_page_to_frame_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
179
+ return c_convert_page_to_frame_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
180
+ OBJ_PTR FM_convert_figure_to_frame_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
181
+ return c_convert_figure_to_frame_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
182
+ OBJ_PTR FM_convert_figure_to_frame_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
183
+ return c_convert_figure_to_frame_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
184
+ OBJ_PTR FM_convert_figure_to_frame_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
185
+ return c_convert_figure_to_frame_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
186
+ OBJ_PTR FM_convert_figure_to_frame_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
187
+ return c_convert_figure_to_frame_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
188
+ OBJ_PTR FM_convert_frame_to_figure_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
189
+ return c_convert_frame_to_figure_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
190
+ OBJ_PTR FM_convert_frame_to_figure_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
191
+ return c_convert_frame_to_figure_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
192
+ OBJ_PTR FM_convert_frame_to_figure_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
193
+ return c_convert_frame_to_figure_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
194
+ OBJ_PTR FM_convert_frame_to_figure_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
195
+ return c_convert_frame_to_figure_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
196
+ OBJ_PTR FM_convert_figure_to_output_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
197
+ return c_convert_figure_to_output_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
198
+ OBJ_PTR FM_convert_figure_to_output_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
199
+ return c_convert_figure_to_output_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
200
+ OBJ_PTR FM_convert_figure_to_output_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
201
+ return c_convert_figure_to_output_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
202
+ OBJ_PTR FM_convert_figure_to_output_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
203
+ return c_convert_figure_to_output_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
204
+ OBJ_PTR FM_convert_output_to_figure_x(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
205
+ return c_convert_output_to_figure_x(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
206
+ OBJ_PTR FM_convert_output_to_figure_y(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
207
+ return c_convert_output_to_figure_y(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
208
+ OBJ_PTR FM_convert_output_to_figure_dx(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
209
+ return c_convert_output_to_figure_dx(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); }
210
+ OBJ_PTR FM_convert_output_to_figure_dy(OBJ_PTR fmkr, OBJ_PTR v) { int ierr=0;
211
+ return c_convert_output_to_figure_dy(fmkr, Get_FM(fmkr, &ierr), Number_to_double(v, &ierr), &ierr); RETURN_NIL; }
212
+ OBJ_PTR FM_doing_subplot(OBJ_PTR fmkr) { int ierr=0; c_doing_subplot(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
213
+ OBJ_PTR FM_doing_subfigure(OBJ_PTR fmkr) { int ierr=0; c_doing_subfigure(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
214
+ OBJ_PTR FM_private_set_bounds(OBJ_PTR fmkr, OBJ_PTR left, OBJ_PTR right, OBJ_PTR top, OBJ_PTR bottom) { int ierr=0;
215
+ c_private_set_bounds(fmkr, Get_FM(fmkr, &ierr), Number_to_double(left, &ierr), Number_to_double(right, &ierr),
216
+ Number_to_double(top, &ierr), Number_to_double(bottom, &ierr), &ierr); RETURN_NIL; }
217
+
218
+ // pdffile.c
219
+ OBJ_PTR FM_pdf_gsave(OBJ_PTR fmkr) { int ierr=0; c_pdf_gsave(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
220
+ OBJ_PTR FM_pdf_grestore(OBJ_PTR fmkr) { int ierr=0; c_pdf_grestore(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
221
+
222
+ // pdfimage.c
223
+ OBJ_PTR FM_private_create_image_data(OBJ_PTR fmkr, OBJ_PTR data,
224
+ OBJ_PTR first_row, OBJ_PTR last_row, OBJ_PTR first_column, OBJ_PTR last_column,
225
+ OBJ_PTR min_val, OBJ_PTR max_val, OBJ_PTR max_code, OBJ_PTR if_below_range, OBJ_PTR if_above_range)
226
+ { int ierr=0;
227
+ return c_private_create_image_data(fmkr, Get_FM(fmkr, &ierr), data,
228
+ Number_to_int(first_row, &ierr), Number_to_int(last_row, &ierr),
229
+ Number_to_int(first_column, &ierr), Number_to_int(last_column, &ierr),
230
+ Number_to_double(min_val, &ierr), Number_to_double(max_val, &ierr), Number_to_int(max_code, &ierr),
231
+ Number_to_int(if_below_range, &ierr), Number_to_int(if_above_range, &ierr), &ierr);
232
+ }
233
+ OBJ_PTR FM_private_create_monochrome_image_data(OBJ_PTR fmkr, OBJ_PTR data,
234
+ OBJ_PTR first_row, OBJ_PTR last_row, OBJ_PTR first_column, OBJ_PTR last_column,
235
+ OBJ_PTR boundary, OBJ_PTR reverse)
236
+ { int ierr=0;
237
+ return c_private_create_monochrome_image_data(fmkr, Get_FM(fmkr, &ierr), data,
238
+ Number_to_int(first_row, &ierr), Number_to_int(last_row, &ierr), Number_to_int(first_column, &ierr), Number_to_int(last_column, &ierr),
239
+ Number_to_double(boundary, &ierr), reverse != OBJ_FALSE, &ierr);
240
+ }
241
+ OBJ_PTR FM_private_show_jpg(OBJ_PTR fmkr, OBJ_PTR filename,
242
+ OBJ_PTR width, OBJ_PTR height, OBJ_PTR image_destination, OBJ_PTR mask_obj_num) { int ierr=0;
243
+ c_private_show_jpg(fmkr, Get_FM(fmkr, &ierr), String_Ptr(filename, &ierr),
244
+ Number_to_int(width, &ierr), Number_to_int(height, &ierr), image_destination, Number_to_int(mask_obj_num, &ierr), &ierr); RETURN_NIL; }
245
+ OBJ_PTR FM_private_show_rgb_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry,
246
+ OBJ_PTR ulx, OBJ_PTR uly, OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_obj_num)
247
+ { int ierr=0;
248
+ return c_private_show_image(fmkr, Get_FM(fmkr, &ierr), RGB_IMAGE, Number_to_double(llx, &ierr), Number_to_double(lly, &ierr),
249
+ Number_to_double(lrx, &ierr), Number_to_double(lry, &ierr),
250
+ Number_to_double(ulx, &ierr), Number_to_double(uly, &ierr), (interpolate != OBJ_FALSE), OBJ_FALSE,
251
+ Number_to_int(w, &ierr), Number_to_int(h, &ierr), (unsigned char *)String_Ptr(data, &ierr), String_Len(data, &ierr),
252
+ OBJ_NIL, OBJ_NIL, OBJ_NIL, OBJ_NIL, Number_to_int(mask_obj_num, &ierr), &ierr);
253
+ }
254
+
255
+ OBJ_PTR FM_private_show_cmyk_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry,
256
+ OBJ_PTR ulx, OBJ_PTR uly, OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_obj_num)
257
+ { int ierr=0;
258
+ return c_private_show_image(fmkr, Get_FM(fmkr, &ierr), CMYK_IMAGE, Number_to_double(llx, &ierr), Number_to_double(lly, &ierr),
259
+ Number_to_double(lrx, &ierr), Number_to_double(lry, &ierr),
260
+ Number_to_double(ulx, &ierr), Number_to_double(uly, &ierr), (interpolate != OBJ_FALSE), false,
261
+ Number_to_int(w, &ierr), Number_to_int(h, &ierr), (unsigned char *)String_Ptr(data, &ierr), String_Len(data, &ierr),
262
+ OBJ_NIL, OBJ_NIL, OBJ_NIL, OBJ_NIL, Number_to_int(mask_obj_num, &ierr), &ierr);
263
+ }
264
+
265
+ OBJ_PTR FM_private_show_grayscale_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry,
266
+ OBJ_PTR ulx, OBJ_PTR uly, OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_obj_num)
267
+ { int ierr=0;
268
+ return c_private_show_image(fmkr, Get_FM(fmkr, &ierr), GRAY_IMAGE, Number_to_double(llx, &ierr), Number_to_double(lly, &ierr),
269
+ Number_to_double(lrx, &ierr), Number_to_double(lry, &ierr),
270
+ Number_to_double(ulx, &ierr), Number_to_double(uly, &ierr), (interpolate != OBJ_FALSE), false,
271
+ Number_to_int(w, &ierr), Number_to_int(h, &ierr), (unsigned char *)String_Ptr(data, &ierr), String_Len(data, &ierr),
272
+ OBJ_NIL, OBJ_NIL, OBJ_NIL, OBJ_NIL, Number_to_int(mask_obj_num, &ierr), &ierr);
273
+ }
274
+
275
+ OBJ_PTR FM_private_show_monochrome_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry,
276
+ OBJ_PTR ulx, OBJ_PTR uly, OBJ_PTR interpolate, OBJ_PTR reversed, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_obj_num)
277
+ { int ierr=0;
278
+ return c_private_show_image(fmkr, Get_FM(fmkr, &ierr), MONO_IMAGE, Number_to_double(llx, &ierr), Number_to_double(lly, &ierr),
279
+ Number_to_double(lrx, &ierr), Number_to_double(lry, &ierr),
280
+ Number_to_double(ulx, &ierr), Number_to_double(uly, &ierr), (interpolate != OBJ_FALSE), (reversed == OBJ_TRUE),
281
+ Number_to_int(w, &ierr), Number_to_int(h, &ierr), (unsigned char *)String_Ptr(data, &ierr), String_Len(data, &ierr),
282
+ OBJ_NIL, OBJ_NIL, OBJ_NIL, OBJ_NIL, Number_to_int(mask_obj_num, &ierr), &ierr);
283
+ }
284
+
285
+ OBJ_PTR FM_private_show_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry,
286
+ OBJ_PTR ulx, OBJ_PTR uly, OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data,
287
+ OBJ_PTR value_mask_min, OBJ_PTR value_mask_max, OBJ_PTR hival, OBJ_PTR lookup, OBJ_PTR mask_obj_num)
288
+ { int ierr=0;
289
+ return c_private_show_image(fmkr, Get_FM(fmkr, &ierr), COLORMAP_IMAGE, Number_to_double(llx, &ierr), Number_to_double(lly, &ierr),
290
+ Number_to_double(lrx, &ierr), Number_to_double(lry, &ierr),
291
+ Number_to_double(ulx, &ierr), Number_to_double(uly, &ierr), (interpolate != OBJ_FALSE), false,
292
+ Number_to_int(w, &ierr), Number_to_int(h, &ierr), (unsigned char *)String_Ptr(data, &ierr), String_Len(data, &ierr),
293
+ value_mask_min, value_mask_max, hival, lookup, Number_to_int(mask_obj_num, &ierr), &ierr);
294
+ }
295
+
296
+
297
+ // pdfpath.c
298
+ OBJ_PTR FM_stroke_color_set(OBJ_PTR fmkr, OBJ_PTR value) { int ierr=0;
299
+ c_stroke_color_set(fmkr, Get_FM(fmkr, &ierr), value, &ierr); RETURN_NIL; }
300
+ OBJ_PTR FM_stroke_color_get(OBJ_PTR fmkr) { int ierr=0;
301
+ return c_stroke_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
302
+ OBJ_PTR FM_fill_color_set(OBJ_PTR fmkr, OBJ_PTR value) { int ierr=0;
303
+ c_fill_color_set(fmkr, Get_FM(fmkr, &ierr), value, &ierr); RETURN_NIL; }
304
+ OBJ_PTR FM_fill_color_get(OBJ_PTR fmkr) { int ierr=0;
305
+ return c_fill_color_get(fmkr, Get_FM(fmkr, &ierr), &ierr); }
306
+ OBJ_PTR FM_line_width_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
307
+ c_line_width_set(fmkr, Get_FM(fmkr, &ierr), Number_to_double(val, &ierr), &ierr); RETURN_NIL; }
308
+ OBJ_PTR FM_rescale_lines(OBJ_PTR fmkr, OBJ_PTR scaling_factor) { int ierr=0;
309
+ c_rescale_lines(fmkr, Get_FM(fmkr, &ierr), Number_to_double(scaling_factor, &ierr), &ierr); RETURN_NIL; }
310
+ OBJ_PTR FM_line_cap_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
311
+ c_line_cap_set(fmkr, Get_FM(fmkr, &ierr), Number_to_int(val, &ierr), &ierr); RETURN_NIL; }
312
+ OBJ_PTR FM_line_join_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
313
+ c_line_join_set(fmkr, Get_FM(fmkr, &ierr), Number_to_int(val, &ierr), &ierr); RETURN_NIL; }
314
+ OBJ_PTR FM_miter_limit_set(OBJ_PTR fmkr, OBJ_PTR val) { int ierr=0;
315
+ c_miter_limit_set(fmkr, Get_FM(fmkr, &ierr), Number_to_double(val, &ierr), &ierr); RETURN_NIL; }
316
+ OBJ_PTR FM_line_type_set(OBJ_PTR fmkr, OBJ_PTR line_type) { int ierr=0;
317
+ c_line_type_set(fmkr, Get_FM(fmkr, &ierr), line_type, &ierr); RETURN_NIL; }
318
+ OBJ_PTR FM_update_bbox(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y) { int ierr=0;
319
+ c_update_bbox(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr), &ierr); RETURN_NIL; }
320
+ OBJ_PTR FM_bbox_left(OBJ_PTR fmkr) { int ierr=0; return c_bbox_left(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
321
+ OBJ_PTR FM_bbox_right(OBJ_PTR fmkr) { int ierr=0; return c_bbox_right(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
322
+ OBJ_PTR FM_bbox_top(OBJ_PTR fmkr) { int ierr=0; return c_bbox_top(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
323
+ OBJ_PTR FM_bbox_bottom(OBJ_PTR fmkr) { int ierr=0; return c_bbox_bottom(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
324
+ OBJ_PTR FM_move_to_point(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y) { int ierr=0;
325
+ c_move_to_point(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr), &ierr); RETURN_NIL; }
326
+ OBJ_PTR FM_append_point_to_path(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y) { int ierr=0;
327
+ c_append_point_to_path(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr), &ierr); RETURN_NIL; }
328
+ OBJ_PTR FM_bezier_control_points(OBJ_PTR fmkr, OBJ_PTR x0, OBJ_PTR y0, OBJ_PTR delta_x, OBJ_PTR a, OBJ_PTR b, OBJ_PTR c) { int ierr=0;
329
+ return c_bezier_control_points(fmkr, Get_FM(fmkr, &ierr),
330
+ Number_to_double(x0, &ierr), Number_to_double(y0, &ierr), Number_to_double(delta_x, &ierr),
331
+ Number_to_double(a, &ierr), Number_to_double(b, &ierr), Number_to_double(c, &ierr), &ierr);
332
+ }
333
+ OBJ_PTR FM_append_curve_to_path(OBJ_PTR fmkr, OBJ_PTR x1, OBJ_PTR y1, OBJ_PTR x2, OBJ_PTR y2, OBJ_PTR x3, OBJ_PTR y3) { int ierr=0;
334
+ c_append_curve_to_path(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x1, &ierr), Number_to_double(y1, &ierr),
335
+ Number_to_double(x2, &ierr), Number_to_double(y2, &ierr),
336
+ Number_to_double(x3, &ierr), Number_to_double(y3, &ierr), &ierr); RETURN_NIL; }
337
+ OBJ_PTR FM_close_path(OBJ_PTR fmkr) { int ierr=0; c_close_path(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
338
+ OBJ_PTR FM_append_arc_to_path(OBJ_PTR fmkr, OBJ_PTR x_start, OBJ_PTR y_start, OBJ_PTR x_corner, OBJ_PTR y_corner,
339
+ OBJ_PTR x_end, OBJ_PTR y_end, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
340
+ // dx and dy are converted to output coords and smaller is used as radius
341
+ c_append_arc_to_path(fmkr, Get_FM(fmkr, &ierr),
342
+ Number_to_double(x_start, &ierr), Number_to_double(y_start, &ierr),
343
+ Number_to_double(x_corner, &ierr), Number_to_double(y_corner, &ierr),
344
+ Number_to_double(x_end, &ierr), Number_to_double(y_end, &ierr),
345
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr);
346
+ RETURN_NIL;
347
+ }
348
+ OBJ_PTR FM_append_rect_to_path(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
349
+ c_append_rect_to_path(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
350
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr);
351
+ RETURN_NIL;
352
+ }
353
+ OBJ_PTR FM_append_rounded_rect_to_path(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y,
354
+ OBJ_PTR width, OBJ_PTR height, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0; // dx and dy are converted to output coords and smaller is used as radius
355
+ c_append_rounded_rect_to_path(fmkr, Get_FM(fmkr, &ierr),
356
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr),
357
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr),
358
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr);
359
+ RETURN_NIL;
360
+ }
361
+ OBJ_PTR FM_append_oval_to_path(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx, OBJ_PTR dy, OBJ_PTR angle) { int ierr=0;
362
+ c_append_oval_to_path(fmkr, Get_FM(fmkr, &ierr),
363
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), Number_to_double(angle, &ierr), &ierr); RETURN_NIL; }
364
+ OBJ_PTR FM_append_circle_to_path(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx) { int ierr=0;
365
+ c_append_circle_to_path(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), &ierr); RETURN_NIL; }
366
+ OBJ_PTR FM_append_points_to_path(OBJ_PTR fmkr, OBJ_PTR x_vec, OBJ_PTR y_vec) { int ierr=0;
367
+ c_append_points_to_path(fmkr, Get_FM(fmkr, &ierr), x_vec, y_vec, &ierr); RETURN_NIL; }
368
+ OBJ_PTR FM_private_append_points_with_gaps_to_path(OBJ_PTR fmkr, OBJ_PTR x_vec, OBJ_PTR y_vec, OBJ_PTR gaps, OBJ_PTR close_gaps) { int ierr=0;
369
+ c_private_append_points_with_gaps_to_path(fmkr, Get_FM(fmkr, &ierr), x_vec, y_vec, gaps, (close_gaps == OBJ_TRUE), &ierr); RETURN_NIL; }
370
+ OBJ_PTR FM_stroke(OBJ_PTR fmkr) { int ierr=0; c_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
371
+ OBJ_PTR FM_close_and_stroke(OBJ_PTR fmkr) { int ierr=0; c_close_and_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
372
+ OBJ_PTR FM_fill(OBJ_PTR fmkr) { int ierr=0; c_fill(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
373
+ OBJ_PTR FM_discard_path(OBJ_PTR fmkr) { int ierr=0; c_discard_path(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
374
+ OBJ_PTR FM_eofill(OBJ_PTR fmkr) { int ierr=0; c_eofill(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
375
+ OBJ_PTR FM_fill_and_stroke(OBJ_PTR fmkr) { int ierr=0; c_fill_and_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
376
+ OBJ_PTR FM_eofill_and_stroke(OBJ_PTR fmkr) { int ierr=0; c_eofill_and_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
377
+ OBJ_PTR FM_close_fill_and_stroke(OBJ_PTR fmkr) { int ierr=0; c_close_fill_and_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
378
+ OBJ_PTR FM_close_eofill_and_stroke(OBJ_PTR fmkr) { int ierr=0; c_close_eofill_and_stroke(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
379
+ OBJ_PTR FM_clip(OBJ_PTR fmkr) { int ierr=0; c_clip(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
380
+ OBJ_PTR FM_eoclip(OBJ_PTR fmkr) { int ierr=0; c_eoclip(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
381
+ OBJ_PTR FM_fill_and_clip(OBJ_PTR fmkr) { int ierr=0; c_fill_and_clip(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
382
+ OBJ_PTR FM_stroke_and_clip(OBJ_PTR fmkr) { int ierr=0; c_stroke_and_clip(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
383
+ OBJ_PTR FM_fill_stroke_and_clip(OBJ_PTR fmkr) { int ierr=0; c_fill_stroke_and_clip(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
384
+ OBJ_PTR FM_stroke_line(OBJ_PTR fmkr, OBJ_PTR x1, OBJ_PTR y1, OBJ_PTR x2, OBJ_PTR y2) { int ierr=0;
385
+ c_stroke_line(fmkr, Get_FM(fmkr, &ierr),
386
+ Number_to_double(x1, &ierr), Number_to_double(y1, &ierr),
387
+ Number_to_double(x2, &ierr), Number_to_double(y2, &ierr), &ierr); RETURN_NIL; }
388
+ OBJ_PTR FM_fill_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
389
+ c_fill_rect(fmkr, Get_FM(fmkr, &ierr),
390
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr),
391
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr); RETURN_NIL; }
392
+ OBJ_PTR FM_stroke_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
393
+ c_stroke_rect(fmkr, Get_FM(fmkr, &ierr),
394
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr),
395
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr); RETURN_NIL; }
396
+ OBJ_PTR FM_fill_and_stroke_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
397
+ c_fill_and_stroke_rect(fmkr, Get_FM(fmkr, &ierr),
398
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr),
399
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr); RETURN_NIL; }
400
+ OBJ_PTR FM_clip_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height) { int ierr=0;
401
+ c_clip_rect(fmkr, Get_FM(fmkr, &ierr),
402
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr),
403
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), &ierr); RETURN_NIL; }
404
+ OBJ_PTR FM_clip_oval(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx, OBJ_PTR dy, OBJ_PTR angle) { int ierr=0;
405
+ c_clip_oval(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
406
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), Number_to_double(angle, &ierr), &ierr); RETURN_NIL; }
407
+ OBJ_PTR FM_fill_oval(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx, OBJ_PTR dy, OBJ_PTR angle) { int ierr=0;
408
+ c_fill_oval(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
409
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), Number_to_double(angle, &ierr), &ierr); RETURN_NIL; }
410
+ OBJ_PTR FM_stroke_oval(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx, OBJ_PTR dy, OBJ_PTR angle) { int ierr=0;
411
+ c_stroke_oval(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
412
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), Number_to_double(angle, &ierr), &ierr); RETURN_NIL; }
413
+ OBJ_PTR FM_fill_and_stroke_oval(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx, OBJ_PTR dy, OBJ_PTR angle) { int ierr=0;
414
+ c_fill_and_stroke_oval(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
415
+ Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), Number_to_double(angle, &ierr), &ierr); RETURN_NIL; }
416
+ OBJ_PTR FM_clip_rounded_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
417
+ c_clip_rounded_rect(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
418
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr); RETURN_NIL; }
419
+ OBJ_PTR FM_fill_rounded_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
420
+ c_fill_rounded_rect(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
421
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr); RETURN_NIL; }
422
+ OBJ_PTR FM_stroke_rounded_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
423
+ c_stroke_rounded_rect(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
424
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr); RETURN_NIL; }
425
+ OBJ_PTR FM_fill_and_stroke_rounded_rect(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR width, OBJ_PTR height, OBJ_PTR dx, OBJ_PTR dy) { int ierr=0;
426
+ c_fill_and_stroke_rounded_rect(fmkr, Get_FM(fmkr, &ierr), Number_to_double(x, &ierr), Number_to_double(y, &ierr),
427
+ Number_to_double(width, &ierr), Number_to_double(height, &ierr), Number_to_double(dx, &ierr), Number_to_double(dy, &ierr), &ierr); RETURN_NIL; }
428
+ OBJ_PTR FM_clip_circle(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx) { int ierr=0;
429
+ c_clip_circle(fmkr, Get_FM(fmkr, &ierr),
430
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), &ierr); RETURN_NIL; }
431
+ OBJ_PTR FM_fill_circle(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx) { int ierr=0;
432
+ c_fill_circle(fmkr, Get_FM(fmkr, &ierr),
433
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), &ierr); RETURN_NIL; }
434
+ OBJ_PTR FM_stroke_circle(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx) { int ierr=0;
435
+ c_stroke_circle(fmkr, Get_FM(fmkr, &ierr),
436
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), &ierr); RETURN_NIL; }
437
+ OBJ_PTR FM_fill_and_stroke_circle(OBJ_PTR fmkr, OBJ_PTR x, OBJ_PTR y, OBJ_PTR dx) { int ierr=0;
438
+ c_fill_and_stroke_circle(fmkr, Get_FM(fmkr, &ierr),
439
+ Number_to_double(x, &ierr), Number_to_double(y, &ierr), Number_to_double(dx, &ierr), &ierr); RETURN_NIL; }
440
+ OBJ_PTR FM_append_frame_to_path(OBJ_PTR fmkr) { int ierr=0; c_append_frame_to_path(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
441
+ OBJ_PTR FM_fill_frame(OBJ_PTR fmkr) { int ierr=0; c_fill_frame(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
442
+ OBJ_PTR FM_stroke_frame(OBJ_PTR fmkr) { int ierr=0; c_stroke_frame(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
443
+ OBJ_PTR FM_fill_and_stroke_frame(OBJ_PTR fmkr) { int ierr=0; c_fill_and_stroke_frame(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
444
+ OBJ_PTR FM_clip_to_frame(OBJ_PTR fmkr) { int ierr=0; c_clip_to_frame(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
445
+
446
+ // pdftext.c
447
+ OBJ_PTR FM_register_font(OBJ_PTR fmkr, OBJ_PTR font_name) { int ierr=0;
448
+ return c_register_font(fmkr, Get_FM(fmkr, &ierr), String_Ptr(font_name, &ierr), &ierr); }
449
+ OBJ_PTR FM_marker_string_info(OBJ_PTR fmkr, OBJ_PTR font_number, OBJ_PTR string, OBJ_PTR scale) { int ierr=0;
450
+ return c_marker_string_info(fmkr, Get_FM(fmkr, &ierr), Number_to_int(font_number, &ierr),
451
+ (unsigned char *)String_Ptr(string, &ierr), Number_to_double(scale, &ierr), &ierr); }
452
+ OBJ_PTR FM_private_show_marker(
453
+ OBJ_PTR fmkr, OBJ_PTR integer_args, OBJ_PTR stroke_width, OBJ_PTR string,
454
+ OBJ_PTR x, OBJ_PTR y, OBJ_PTR x_vec, OBJ_PTR y_vec,
455
+ OBJ_PTR h_scale, OBJ_PTR v_scale, OBJ_PTR scale, OBJ_PTR it_angle,
456
+ OBJ_PTR ascent_angle, OBJ_PTR angle,
457
+ OBJ_PTR fill_color, OBJ_PTR stroke_color) { int ierr=0;
458
+ c_private_show_marker(fmkr, Get_FM(fmkr, &ierr), Number_to_int(integer_args, &ierr), stroke_width,
459
+ string, x, y, x_vec, y_vec, Number_to_double(h_scale, &ierr), Number_to_double(v_scale, &ierr),
460
+ Number_to_double(scale, &ierr), Number_to_double(it_angle, &ierr), Number_to_double(ascent_angle, &ierr), Number_to_double(angle, &ierr),
461
+ fill_color, stroke_color, &ierr); RETURN_NIL; }
462
+
463
+ // texout.c
464
+ OBJ_PTR FM_rescale_text(OBJ_PTR fmkr, OBJ_PTR scaling_factor) { int ierr=0;
465
+ c_rescale_text(fmkr, Get_FM(fmkr, &ierr), Number_to_double(scaling_factor, &ierr), &ierr); RETURN_NIL; }
466
+ OBJ_PTR FM_show_rotated_text(OBJ_PTR fmkr, OBJ_PTR text, OBJ_PTR frame_side, OBJ_PTR shift,
467
+ OBJ_PTR fraction, OBJ_PTR scale, OBJ_PTR angle, OBJ_PTR justification, OBJ_PTR alignment, OBJ_PTR measure_name) { int ierr=0;
468
+ c_show_rotated_text(fmkr, Get_FM(fmkr, &ierr), String_Ptr(text, &ierr), Number_to_int(frame_side, &ierr), Number_to_double(shift, &ierr),
469
+ Number_to_double(fraction, &ierr), Number_to_double(scale, &ierr), Number_to_double(angle, &ierr),
470
+ Number_to_int(justification, &ierr), Number_to_int(alignment, &ierr), measure_name, &ierr); RETURN_NIL; }
471
+ OBJ_PTR FM_show_rotated_label(OBJ_PTR fmkr, OBJ_PTR text,
472
+ OBJ_PTR xloc, OBJ_PTR yloc, OBJ_PTR scale, OBJ_PTR angle, OBJ_PTR justification, OBJ_PTR alignment, OBJ_PTR measure_name) { int ierr=0;
473
+ c_show_rotated_label(fmkr, Get_FM(fmkr, &ierr), String_Ptr(text, &ierr), Number_to_double(xloc, &ierr), Number_to_double(yloc, &ierr),
474
+ Number_to_double(scale, &ierr), Number_to_double(angle, &ierr), Number_to_int(justification, &ierr), Number_to_int(alignment, &ierr), measure_name, &ierr);
475
+ RETURN_NIL; }
476
+ OBJ_PTR FM_check_label_clip(OBJ_PTR fmkr, OBJ_PTR xloc, OBJ_PTR yloc) { int ierr=0;
477
+ return c_check_label_clip(fmkr, Get_FM(fmkr, &ierr), Number_to_double(xloc, &ierr), Number_to_double(yloc, &ierr), &ierr); }
478
+
479
+
480
+ OBJ_PTR FM_save_measure(OBJ_PTR fmkr, OBJ_PTR measure_name,
481
+ OBJ_PTR width, OBJ_PTR height, OBJ_PTR depth)
482
+ {
483
+ int ierr;
484
+ c_save_measure(fmkr, measure_name,
485
+ Number_to_double(width,&ierr),
486
+ Number_to_double(height,&ierr),
487
+ Number_to_double(depth,&ierr));
488
+ return OBJ_NIL;
489
+ }