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
@@ -1,523 +0,0 @@
1
- /* pdfcoords.c */
2
- /*
3
- Copyright (C) 2005 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
-
25
- /* Frame and Bounds */
26
- void Recalc_Font_Hts(FM *p)
27
- {
28
- double dx, dy;
29
- dx = dy = ENLARGE * p->default_font_size * p->default_text_scale; // font height in output coords
30
- dx = convert_output_to_page_dx(p,dx);
31
- dx = convert_page_to_frame_dx(p,dx);
32
- p->default_text_height_dx = convert_frame_to_figure_dx(p,dx);
33
- dy = convert_output_to_page_dy(p,dy);
34
- dy = convert_page_to_frame_dy(p,dy);
35
- p->default_text_height_dy = convert_frame_to_figure_dy(p,dy);
36
- }
37
-
38
- void c_set_subframe(FM *p, double left_margin, double right_margin, double top_margin, double bottom_margin)
39
- {
40
- double x, y, w, h;
41
- if (left_margin < 0 || right_margin < 0 || top_margin < 0 || bottom_margin < 0)
42
- rb_raise(rb_eArgError, "Sorry: margins for set_subframe must be non-negative");
43
- if (left_margin + right_margin >= 1.0)
44
- rb_raise(rb_eArgError, "Sorry: margins too large: left_margin (%g) right_margin (%g)", left_margin, right_margin);
45
- if (top_margin + bottom_margin >= 1.0)
46
- rb_raise(rb_eArgError, "Sorry: margins too large: top_margin (%g) bottom_margin (%g)", top_margin, bottom_margin);
47
- x = p->frame_left += left_margin * p->frame_width;
48
- p->frame_right -= right_margin * p->frame_width;
49
- p->frame_top -= top_margin * p->frame_height;
50
- y = p->frame_bottom += bottom_margin * p->frame_height;
51
- w = p->frame_width = p->frame_right - p->frame_left;
52
- h = p->frame_height = p->frame_top - p->frame_bottom;
53
- Recalc_Font_Hts(p);
54
- }
55
-
56
- VALUE FM_private_set_subframe(VALUE fmkr, VALUE left_margin, VALUE right_margin, VALUE top_margin, VALUE bottom_margin)
57
- {
58
- FM *p = Get_FM(fmkr);
59
- left_margin = rb_Float(left_margin);
60
- right_margin = rb_Float(right_margin);
61
- top_margin = rb_Float(top_margin);
62
- bottom_margin = rb_Float(bottom_margin);
63
- c_set_subframe(p, NUM2DBL(left_margin), NUM2DBL(right_margin), NUM2DBL(top_margin), NUM2DBL(bottom_margin));
64
- return fmkr;
65
- }
66
-
67
-
68
- void c_private_set_default_font_size(FM *p, double size) {
69
- p->default_font_size = size;
70
- Recalc_Font_Hts(p);
71
- }
72
-
73
- VALUE FM_private_set_default_font_size(VALUE fmkr, VALUE size) {
74
- FM *p = Get_FM(fmkr);
75
- size = rb_Float(size);
76
- c_private_set_default_font_size(p, NUM2DBL(size));
77
- return fmkr;
78
- }
79
-
80
-
81
-
82
- // We need to do some extra work to use 'ensure' around 'context'
83
- // which is necessary in case code does 'return' from the block being executed in the context
84
- // otherwise we won't get a chance to restore the state
85
- typedef struct {
86
- VALUE fmkr;
87
- FM *p;
88
- FM saved;
89
- VALUE cmd;
90
- } Context_Info;
91
-
92
- static VALUE do_context_body(VALUE args)
93
- {
94
- Context_Info *cp = (Context_Info *)args; // nasty but it works
95
- fprintf(TF, "q\n");
96
- return do_cmd(cp->fmkr, cp->cmd);
97
- }
98
-
99
- static VALUE do_context_ensure(VALUE args)
100
- {
101
- Context_Info *cp = (Context_Info *)args;
102
- fprintf(TF, "Q\n");
103
- *cp->p = cp->saved;
104
- return Qnil; // what should we be returning here?
105
- }
106
-
107
- VALUE FM_private_context(VALUE fmkr, VALUE cmd)
108
- {
109
- Context_Info c;
110
- c.fmkr = fmkr;
111
- c.cmd = cmd;
112
- c.p = Get_FM(fmkr);
113
- c.saved = *c.p;
114
- return rb_ensure(do_context_body, (VALUE)&c, do_context_ensure, (VALUE)&c);
115
- }
116
-
117
- VALUE FM_doing_subplot(VALUE fmkr)
118
- {
119
- FM *p = Get_FM(fmkr);
120
- p->in_subplot = true;
121
- return fmkr;
122
- }
123
-
124
- VALUE FM_doing_subfigure(VALUE fmkr)
125
- {
126
- FM *p = Get_FM(fmkr);
127
- p->root_figure = false;
128
- return fmkr;
129
- }
130
-
131
- void c_set_bounds(FM *p, double left, double right, double top, double bottom)
132
- {
133
- if (constructing_path) rb_raise(rb_eArgError, "Sorry: must finish with current path before calling set_bounds");
134
- p->bounds_left = left; p->bounds_right = right;
135
- p->bounds_bottom = bottom; p->bounds_top = top;
136
- if (left < right) {
137
- p->xaxis_reversed = false;
138
- p->bounds_xmin = left; p->bounds_xmax = right;
139
- } else if (right < left) {
140
- p->xaxis_reversed = true;
141
- p->bounds_xmin = right; p->bounds_xmax = left;
142
- } else { // left == right
143
- p->xaxis_reversed = false;
144
- if (left > 0.0) {
145
- p->bounds_xmin = left * (1.0 - 1e-6); p->bounds_xmax = left * (1.0 + 1e-6);
146
- } else if (left < 0.0) {
147
- p->bounds_xmin = left * (1.0 + 1e-6); p->bounds_xmax = left * (1.0 - 1e-6);
148
- } else {
149
- p->bounds_xmin = -1e-6; p->bounds_xmax = 1e-6;
150
- }
151
- }
152
- if (bottom < top) {
153
- p->yaxis_reversed = false;
154
- p->bounds_ymin = bottom; p->bounds_ymax = top;
155
- } else if (top < bottom) {
156
- p->yaxis_reversed = true;
157
- p->bounds_ymin = top; p->bounds_ymax = bottom;
158
- } else { // top == bottom
159
- p->yaxis_reversed = false;
160
- if (bottom > 0.0) {
161
- p->bounds_ymin = bottom * (1.0 - 1e-6); p->bounds_ymax = bottom * (1.0 + 1e-6);
162
- } else if (bottom < 0.0) {
163
- p->bounds_ymin = bottom * (1.0 + 1e-6); p->bounds_ymax = bottom * (1.0 - 1e-6);
164
- } else {
165
- p->bounds_xmin = -1e-6; p->bounds_xmax = 1e-6;
166
- }
167
- }
168
- p->bounds_width = p->bounds_xmax - p->bounds_xmin;
169
- p->bounds_height = p->bounds_ymax - p->bounds_ymin;
170
- Recalc_Font_Hts(p);
171
- }
172
-
173
- VALUE FM_private_set_bounds(VALUE fmkr, VALUE left, VALUE right, VALUE top, VALUE bottom)
174
- {
175
- FM *p = Get_FM(fmkr);
176
- double left_boundary, right_boundary, top_boundary, bottom_boundary;
177
- left = rb_Float(left);
178
- left_boundary = NUM2DBL(left);
179
- right = rb_Float(right);
180
- right_boundary = NUM2DBL(right);
181
- top = rb_Float(top);
182
- top_boundary = NUM2DBL(top);
183
- bottom = rb_Float(bottom);
184
- bottom_boundary = NUM2DBL(bottom);
185
- c_set_bounds(p, left_boundary, right_boundary, top_boundary, bottom_boundary);
186
- return fmkr;
187
- }
188
-
189
-
190
- // Conversions
191
-
192
- double c_convert_to_degrees(FM *p, double dx, double dy) // dx and dy in figure coords
193
- {
194
- double angle;
195
- if (dx == 0.0 && dy == 0.0) angle = 0.0;
196
- else if (dx > 0.0 && dy == 0.0) angle = (p->bounds_left > p->bounds_right)? 180.0 : 0.0;
197
- else if (dx < 0.0 && dy == 0.0) angle = (p->bounds_left > p->bounds_right)? 0.0 : 180.0;
198
- else if (dx == 0.0 && dy > 0.0) angle = (p->bounds_bottom > p->bounds_top)? -90.0 : 90.0;
199
- else if (dx == 0.0 && dy < 0.0) angle = (p->bounds_bottom > p->bounds_top)? 90.0 : -90.0;
200
- else angle = atan2(convert_figure_to_output_dy(p,dy),convert_figure_to_output_dx(p,dx))*RADIANS_TO_DEGREES;
201
- return angle;
202
- }
203
-
204
- VALUE FM_convert_to_degrees(VALUE fmkr, VALUE dx, VALUE dy) // dx and dy in figure coords
205
- {
206
- FM *p = Get_FM(fmkr);
207
- dx = rb_Float(dx);
208
- dy = rb_Float(dy);
209
- return rb_float_new(c_convert_to_degrees(p, NUM2DBL(dx), NUM2DBL(dy)));
210
- }
211
-
212
-
213
-
214
- VALUE FM_convert_inches_to_output(VALUE fmkr, VALUE v)
215
- {
216
- v = rb_Float(v); double val = NUM2DBL(v);
217
- val = convert_inches_to_output(val);
218
- return rb_float_new(val);
219
- }
220
-
221
- VALUE FM_convert_output_to_inches(VALUE fmkr, VALUE v)
222
- {
223
- v = rb_Float(v); double val = NUM2DBL(v);
224
- val = convert_output_to_inches(val);
225
- return rb_float_new(val);
226
- }
227
-
228
-
229
- VALUE FM_convert_mm_to_output(VALUE fmkr, VALUE v)
230
- {
231
- v = rb_Float(v); double val = NUM2DBL(v);
232
- val = convert_mm_to_output(val);
233
- return rb_float_new(val);
234
- }
235
-
236
- VALUE FM_convert_output_to_mm(VALUE fmkr, VALUE v)
237
- {
238
- v = rb_Float(v); double val = NUM2DBL(v);
239
- val = convert_output_to_mm(val);
240
- return rb_float_new(val);
241
- }
242
-
243
-
244
- VALUE FM_convert_page_to_output_x(VALUE fmkr, VALUE v)
245
- {
246
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
247
- val = convert_page_to_output_x(p,val);
248
- return rb_float_new(val);
249
- }
250
-
251
- VALUE FM_convert_page_to_output_y(VALUE fmkr, VALUE v)
252
- {
253
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
254
- val = convert_page_to_output_y(p,val);
255
- return rb_float_new(val);
256
- }
257
-
258
- VALUE FM_convert_page_to_output_dx(VALUE fmkr, VALUE v)
259
- {
260
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
261
- val = convert_page_to_output_dx(p,val);
262
- return rb_float_new(val);
263
- }
264
-
265
- VALUE FM_convert_page_to_output_dy(VALUE fmkr, VALUE v)
266
- {
267
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
268
- val = convert_page_to_output_dy(p,val);
269
- return rb_float_new(val);
270
- }
271
-
272
- VALUE FM_convert_output_to_page_x(VALUE fmkr, VALUE v)
273
- {
274
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
275
- val = convert_output_to_page_x(p,val);
276
- return rb_float_new(val);
277
- }
278
-
279
- VALUE FM_convert_output_to_page_y(VALUE fmkr, VALUE v)
280
- {
281
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
282
- val = convert_output_to_page_y(p,val);
283
- return rb_float_new(val);
284
- }
285
-
286
- VALUE FM_convert_output_to_page_dx(VALUE fmkr, VALUE v)
287
- {
288
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
289
- return convert_output_to_page_dx(p,val);
290
- return rb_float_new(val);
291
- }
292
-
293
- VALUE FM_convert_output_to_page_dy(VALUE fmkr, VALUE v)
294
- {
295
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
296
- val = convert_output_to_page_dy(p,val);
297
- return rb_float_new(val);
298
- }
299
-
300
- VALUE FM_convert_frame_to_page_x(VALUE fmkr, VALUE v)
301
- {
302
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
303
- val = convert_frame_to_page_x(p,val);
304
- return rb_float_new(val);
305
- }
306
-
307
- VALUE FM_convert_frame_to_page_y(VALUE fmkr, VALUE v)
308
- {
309
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
310
- val = convert_frame_to_page_y(p,val);
311
- return rb_float_new(val);
312
- }
313
-
314
- VALUE FM_convert_frame_to_page_dx(VALUE fmkr, VALUE v)
315
- {
316
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
317
- val = convert_frame_to_page_dx(p,val);
318
- return rb_float_new(val);
319
- }
320
-
321
- VALUE FM_convert_frame_to_page_dy(VALUE fmkr, VALUE v)
322
- {
323
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
324
- val = convert_frame_to_page_dy(p,val);
325
- return rb_float_new(val);
326
- }
327
-
328
- VALUE FM_convert_page_to_frame_x(VALUE fmkr, VALUE v)
329
- {
330
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
331
- val = convert_page_to_frame_x(p,val);
332
- return rb_float_new(val);
333
- }
334
-
335
- VALUE FM_convert_page_to_frame_y(VALUE fmkr, VALUE v)
336
- {
337
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
338
- val = convert_page_to_frame_y(p,val);
339
- return rb_float_new(val);
340
- }
341
-
342
- VALUE FM_convert_page_to_frame_dx(VALUE fmkr, VALUE v)
343
- {
344
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
345
- val = convert_page_to_frame_dx(p,val);
346
- return rb_float_new(val);
347
- }
348
-
349
- VALUE FM_convert_page_to_frame_dy(VALUE fmkr, VALUE v)
350
- {
351
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
352
- val = convert_page_to_frame_dy(p,val);
353
- return rb_float_new(val);
354
- }
355
-
356
- VALUE FM_convert_figure_to_frame_x(VALUE fmkr, VALUE v)
357
- {
358
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
359
- val = convert_figure_to_frame_x(p,val);
360
- return rb_float_new(val);
361
- }
362
-
363
- VALUE FM_convert_figure_to_frame_y(VALUE fmkr, VALUE v)
364
- {
365
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
366
- val = convert_figure_to_frame_y(p,val);
367
- return rb_float_new(val);
368
- }
369
-
370
- VALUE FM_convert_figure_to_frame_dx(VALUE fmkr, VALUE v)
371
- {
372
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
373
- val = convert_figure_to_frame_dx(p,val);
374
- return rb_float_new(val);
375
- }
376
-
377
- VALUE FM_convert_figure_to_frame_dy(VALUE fmkr, VALUE v)
378
- {
379
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
380
- val = convert_figure_to_frame_dy(p,val);
381
- return rb_float_new(val);
382
- }
383
-
384
- VALUE FM_convert_frame_to_figure_x(VALUE fmkr, VALUE v)
385
- {
386
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
387
- val = convert_frame_to_figure_x(p,val);
388
- return rb_float_new(val);
389
- }
390
-
391
- VALUE FM_convert_frame_to_figure_y(VALUE fmkr, VALUE v)
392
- {
393
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
394
- val = convert_frame_to_figure_y(p,val);
395
- return rb_float_new(val);
396
- }
397
-
398
- VALUE FM_convert_frame_to_figure_dx(VALUE fmkr, VALUE v)
399
- {
400
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
401
- val = convert_frame_to_figure_dx(p,val);
402
- return rb_float_new(val);
403
- }
404
-
405
- VALUE FM_convert_frame_to_figure_dy(VALUE fmkr, VALUE v)
406
- {
407
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
408
- val = convert_frame_to_figure_dy(p,val);
409
- return rb_float_new(val);
410
- }
411
-
412
- double convert_figure_to_output_x(FM *p, double x)
413
- {
414
- x = convert_figure_to_frame_x(p,x);
415
- x = convert_frame_to_page_x(p,x);
416
- x = convert_page_to_output_x(p,x);
417
- return x;
418
- }
419
-
420
- double convert_figure_to_output_dy(FM *p, double dy)
421
- {
422
- dy = convert_figure_to_frame_dy(p,dy);
423
- dy = convert_frame_to_page_dy(p,dy);
424
- dy = convert_page_to_output_dy(p,dy);
425
- return dy;
426
- }
427
-
428
- double convert_figure_to_output_dx(FM *p, double dx)
429
- {
430
- dx = convert_figure_to_frame_dx(p,dx);
431
- dx = convert_frame_to_page_dx(p,dx);
432
- dx = convert_page_to_output_dx(p,dx);
433
- return dx;
434
- }
435
-
436
- double convert_figure_to_output_y(FM *p, double y)
437
- {
438
- y = convert_figure_to_frame_y(p,y);
439
- y = convert_frame_to_page_y(p,y);
440
- y = convert_page_to_output_y(p,y);
441
- return y;
442
- }
443
-
444
- VALUE FM_convert_figure_to_output_x(VALUE fmkr, VALUE v)
445
- {
446
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
447
- return rb_float_new(convert_figure_to_output_x(p,val));
448
- }
449
-
450
- VALUE FM_convert_figure_to_output_y(VALUE fmkr, VALUE v)
451
- {
452
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
453
- return rb_float_new(convert_figure_to_output_y(p,val));
454
- }
455
-
456
- VALUE FM_convert_figure_to_output_dx(VALUE fmkr, VALUE v)
457
- {
458
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
459
- return rb_float_new(convert_figure_to_output_dx(p,val));
460
- }
461
-
462
- VALUE FM_convert_figure_to_output_dy(VALUE fmkr, VALUE v)
463
- {
464
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
465
- return rb_float_new(convert_figure_to_output_dy(p,val));
466
- }
467
-
468
- double convert_output_to_figure_x(FM *p, double x)
469
- {
470
- x = convert_output_to_page_x(p,x);
471
- x = convert_page_to_frame_x(p,x);
472
- x = convert_frame_to_figure_x(p,x);
473
- return x;
474
- }
475
-
476
- double convert_output_to_figure_dy(FM *p, double dy)
477
- {
478
- dy = convert_output_to_page_dy(p,dy);
479
- dy = convert_page_to_frame_dy(p,dy);
480
- dy = convert_frame_to_figure_dy(p,dy);
481
- return dy;
482
- }
483
-
484
- double convert_output_to_figure_dx(FM *p, double dx)
485
- {
486
- dx = convert_output_to_page_dx(p,dx);
487
- dx = convert_page_to_frame_dx(p,dx);
488
- dx = convert_frame_to_figure_dx(p,dx);
489
- return dx;
490
- }
491
-
492
- double convert_output_to_figure_y(FM *p, double y)
493
- {
494
- y = convert_output_to_page_y(p,y);
495
- y = convert_page_to_frame_y(p,y);
496
- y = convert_frame_to_figure_y(p,y);
497
- return y;
498
- }
499
-
500
- VALUE FM_convert_output_to_figure_x(VALUE fmkr, VALUE v)
501
- {
502
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
503
- return rb_float_new(convert_output_to_figure_x(p,val));
504
- }
505
-
506
- VALUE FM_convert_output_to_figure_y(VALUE fmkr, VALUE v)
507
- {
508
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
509
- return rb_float_new(convert_output_to_figure_y(p,val));
510
- }
511
-
512
- VALUE FM_convert_output_to_figure_dx(VALUE fmkr, VALUE v)
513
- {
514
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
515
- return rb_float_new(convert_output_to_figure_dx(p,val));
516
- }
517
-
518
- VALUE FM_convert_output_to_figure_dy(VALUE fmkr, VALUE v)
519
- {
520
- FM *p = Get_FM(fmkr); v = rb_Float(v); double val = NUM2DBL(v);
521
- return rb_float_new(convert_output_to_figure_dy(p,val));
522
- }
523
-