tioga 1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Tioga_README +372 -0
- data/lgpl.txt +504 -0
- data/split/Dtable/defs.h +33 -0
- data/split/Dtable/dtable.c +1928 -0
- data/split/Dtable/dtable_intern.h +144 -0
- data/split/Dtable/dvector.h +61 -0
- data/split/Dtable/extconf.rb +4 -0
- data/split/Dtable/include/dtable.h +35 -0
- data/split/Dtable/lib/Dtable_extras.rb +90 -0
- data/split/Dtable/namespace.h +47 -0
- data/split/Dtable/safe_double.h +104 -0
- data/split/Dtable/symbols.c +92 -0
- data/split/Dtable/symbols.h +52 -0
- data/split/Dvector/defs.h +33 -0
- data/split/Dvector/dvector.c +5486 -0
- data/split/Dvector/dvector_intern.h +142 -0
- data/split/Dvector/extconf.rb +4 -0
- data/split/Dvector/include/dvector.h +61 -0
- data/split/Dvector/lib/Dvector_extras.rb +328 -0
- data/split/Dvector/lib/Numeric_extras.rb +134 -0
- data/split/Dvector/namespace.h +47 -0
- data/split/Dvector/safe_double.h +104 -0
- data/split/Dvector/symbols.c +92 -0
- data/split/Dvector/symbols.h +52 -0
- data/split/Flate/defs.h +33 -0
- data/split/Flate/extconf.rb +19 -0
- data/split/Flate/flate.c +156 -0
- data/split/Flate/flate_intern.h +97 -0
- data/split/Flate/include/flate.h +98 -0
- data/split/Flate/namespace.h +47 -0
- data/split/Flate/safe_double.h +104 -0
- data/split/Flate/symbols.c +92 -0
- data/split/Flate/symbols.h +52 -0
- data/split/Function/defs.h +33 -0
- data/split/Function/dvector.h +61 -0
- data/split/Function/extconf.rb +4 -0
- data/split/Function/function.c +988 -0
- data/split/Function/joint_qsort.c +258 -0
- data/split/Function/lib/Function_extras.rb +44 -0
- data/split/Function/namespace.h +47 -0
- data/split/Function/safe_double.h +104 -0
- data/split/Function/symbols.c +92 -0
- data/split/Function/symbols.h +52 -0
- data/split/Tioga/axes.c +774 -0
- data/split/Tioga/defs.h +33 -0
- data/split/Tioga/dtable.h +35 -0
- data/split/Tioga/dvector.h +61 -0
- data/split/Tioga/extconf.rb +4 -0
- data/split/Tioga/figures.c +672 -0
- data/split/Tioga/figures.h +855 -0
- data/split/Tioga/flate.h +98 -0
- data/split/Tioga/init.c +524 -0
- data/split/Tioga/lib/Arcs_and_Circles.rb +64 -0
- data/split/Tioga/lib/ColorConstants.rb +274 -0
- data/split/Tioga/lib/Colorbars.rb +10 -0
- data/split/Tioga/lib/Colormaps.rb +105 -0
- data/split/Tioga/lib/Coordinate_Conversions.rb +194 -0
- data/split/Tioga/lib/Creating_Paths.rb +94 -0
- data/split/Tioga/lib/Doc.rb +91 -0
- data/split/Tioga/lib/Executive.rb +515 -0
- data/split/Tioga/lib/FigMkr.rb +2224 -0
- data/split/Tioga/lib/FigureConstants.rb +125 -0
- data/split/Tioga/lib/Figures_and_Plots.rb +268 -0
- data/split/Tioga/lib/Images.rb +278 -0
- data/split/Tioga/lib/Legends.rb +190 -0
- data/split/Tioga/lib/MarkerConstants.rb +122 -0
- data/split/Tioga/lib/Markers.rb +129 -0
- data/split/Tioga/lib/Page_Frame_Bounds.rb +567 -0
- data/split/Tioga/lib/Rectangles.rb +94 -0
- data/split/Tioga/lib/Shading.rb +100 -0
- data/split/Tioga/lib/Special_Paths.rb +307 -0
- data/split/Tioga/lib/Strokes.rb +129 -0
- data/split/Tioga/lib/TeX_Text.rb +454 -0
- data/split/Tioga/lib/TexPreamble.rb +358 -0
- data/split/Tioga/lib/Titles_and_Labels.rb +306 -0
- data/split/Tioga/lib/Transparency.rb +89 -0
- data/split/Tioga/lib/Using_Paths.rb +164 -0
- data/split/Tioga/lib/Utils.rb +74 -0
- data/split/Tioga/lib/X_and_Y_Axes.rb +749 -0
- data/split/Tioga/lib/irb_tioga.rb +122 -0
- data/split/Tioga/lib/tioga.rb +1 -0
- data/split/Tioga/lib/tioga_ui.rb +5 -0
- data/split/Tioga/lib/tioga_ui_cmds.rb +793 -0
- data/split/Tioga/makers.c +989 -0
- data/split/Tioga/mk_tioga_sty.rb +53 -0
- data/split/Tioga/namespace.h +47 -0
- data/split/Tioga/pdf_font_dicts.c +18253 -0
- data/split/Tioga/pdfcolor.c +486 -0
- data/split/Tioga/pdfcoords.c +505 -0
- data/split/Tioga/pdffile.c +342 -0
- data/split/Tioga/pdfimage.c +536 -0
- data/split/Tioga/pdfpath.c +914 -0
- data/split/Tioga/pdfs.h +229 -0
- data/split/Tioga/pdftext.c +443 -0
- data/split/Tioga/safe_double.h +104 -0
- data/split/Tioga/symbols.c +92 -0
- data/split/Tioga/symbols.h +52 -0
- data/split/Tioga/texout.c +380 -0
- data/split/defs.h +33 -0
- data/split/extconf.rb +107 -0
- data/split/mkmf2.rb +1612 -0
- data/split/namespace.h +47 -0
- data/split/safe_double.h +104 -0
- data/split/scripts/tioga +4 -0
- data/split/symbols.c +92 -0
- data/split/symbols.h +52 -0
- data/tests/dtable_test.data +6 -0
- data/tests/dvector_read_test.data +1 -0
- data/tests/dvector_test.data +101 -0
- data/tests/tc_Dtable.rb +221 -0
- data/tests/tc_Dvector.rb +791 -0
- data/tests/tc_FMkr.rb +162 -0
- data/tests/tc_Flate.rb +45 -0
- data/tests/tc_Function.rb +111 -0
- data/tests/ts_Tioga.rb +38 -0
- metadata +163 -0
data/split/Tioga/defs.h
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
defs.h:
|
4
|
+
some definitions that are used everywhere and that depend on some
|
5
|
+
HAVE_* macros.
|
6
|
+
|
7
|
+
Copyright (C) 2006 Vincent Fourmond
|
8
|
+
|
9
|
+
This program is free software; you can redistribute it and/or modify
|
10
|
+
it under the terms of the GNU General Library Public License as published
|
11
|
+
by the Free Software Foundation; either version 2 of the License, or
|
12
|
+
(at your option) any later version.
|
13
|
+
|
14
|
+
This program is distributed in the hope that it will be useful,
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
GNU Library General Public License for more details.
|
18
|
+
|
19
|
+
You should have received a copy of the GNU Library General Public License
|
20
|
+
along with this program; if not, write to the Free Software
|
21
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
22
|
+
|
23
|
+
**********************************************************************/
|
24
|
+
|
25
|
+
|
26
|
+
#ifdef HAVE_ISNAN
|
27
|
+
/* we use isnan and isinf, which are much faster than the workaround */
|
28
|
+
#define is_okay_number(x) (! isnan(x) && ! isinf(x))
|
29
|
+
#else
|
30
|
+
#define is_okay_number(x) ((x) - (x) == 0.0)
|
31
|
+
#define isnan(x) ((x) != (x))
|
32
|
+
/* yes, as funny as it may look NaN != NaN, and that's the only one */
|
33
|
+
#endif
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/* dtable.h */
|
2
|
+
/*
|
3
|
+
Copyright (C) 2004 Bill Paxton
|
4
|
+
|
5
|
+
This file is part of Dtable.
|
6
|
+
|
7
|
+
Dtable 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
|
+
Dtable 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 Dtable; if not, write to the Free Software
|
19
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef __dtable_H__
|
23
|
+
#define __dtable_H__
|
24
|
+
|
25
|
+
#include <symbols.h>
|
26
|
+
|
27
|
+
/*======================================================================*/
|
28
|
+
|
29
|
+
|
30
|
+
DECLARE_SYMBOL(VALUE, Read_Dtable,
|
31
|
+
(VALUE dest, char *filename, int skip_lines));
|
32
|
+
DECLARE_SYMBOL(double **, Dtable_Ptr,
|
33
|
+
(VALUE dtable, long *num_cols, long *num_rows));
|
34
|
+
|
35
|
+
#endif
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/* Dvector.h */
|
2
|
+
/*
|
3
|
+
Copyright (C) 2005 Bill Paxton
|
4
|
+
|
5
|
+
Dvector is free software; you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Library Public License as published
|
7
|
+
by the Free Software Foundation; either version 2 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Dvector is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU Library General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Library General Public License
|
16
|
+
along with Dvector; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*/
|
19
|
+
|
20
|
+
#ifndef __Dvector_H__
|
21
|
+
#define __Dvector_H__
|
22
|
+
|
23
|
+
/* this file has been heavily modified by Vincent Fourmond to take care
|
24
|
+
of the 'RCR330' scheme of exporting symbols
|
25
|
+
*/
|
26
|
+
|
27
|
+
#include <symbols.h>
|
28
|
+
#include <stdbool.h>
|
29
|
+
|
30
|
+
/*======================================================================*/
|
31
|
+
|
32
|
+
/* functions for handling Dvectors: */
|
33
|
+
|
34
|
+
DECLARE_SYMBOL(double *, Dvector_Data_for_Read, (VALUE dvector, long *len_ptr));
|
35
|
+
/* returns pointer to the dvector's data (which may be shared) */
|
36
|
+
DECLARE_SYMBOL(double *, Dvector_Data_Copy, (VALUE dvector, long *len_ptr));
|
37
|
+
/* like Dvector_Data_for_Read, but returns pointer to a copy of the data */
|
38
|
+
DECLARE_SYMBOL(double *, Dvector_Data_for_Write,
|
39
|
+
(VALUE dvector, long *len_ptr));
|
40
|
+
DECLARE_SYMBOL(double *, Dvector_Data_Resize, (VALUE dvector, long new_len));
|
41
|
+
DECLARE_SYMBOL(double *, Dvector_Data_Replace,
|
42
|
+
(VALUE dvector, long len, double *data));
|
43
|
+
/* copies the data into the dvector */
|
44
|
+
DECLARE_SYMBOL(VALUE, Dvector_Create, (void));
|
45
|
+
DECLARE_SYMBOL(void, Dvector_Store_Double, (VALUE ary, long idx, double val));
|
46
|
+
/* pushes one element onto the vector */
|
47
|
+
DECLARE_SYMBOL(void, Dvector_Push_Double, (VALUE ary, double val));
|
48
|
+
|
49
|
+
/* functions for interpolation */
|
50
|
+
DECLARE_SYMBOL(double, c_dvector_spline_interpolate,
|
51
|
+
(double x, int n_pts_data, double *Xs, double *Ys,
|
52
|
+
double *Bs, double *Cs, double *Ds));
|
53
|
+
DECLARE_SYMBOL(double, c_dvector_linear_interpolate,
|
54
|
+
(int num_pts, double *xs, double *ys, double x));
|
55
|
+
DECLARE_SYMBOL(void, c_dvector_create_spline_interpolant,
|
56
|
+
(int n_pts_data, double *Xs, double *Ys,
|
57
|
+
bool start_clamped, double start_slope,
|
58
|
+
bool end_clamped, double end_slope,
|
59
|
+
double *As, double *Bs, double *Cs));
|
60
|
+
#endif /* __Dvector_H__ */
|
61
|
+
|
@@ -0,0 +1,672 @@
|
|
1
|
+
/* figures.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
|
+
/*
|
23
|
+
:stopdoc:
|
24
|
+
*/
|
25
|
+
|
26
|
+
#include "figures.h"
|
27
|
+
#include "pdfs.h"
|
28
|
+
#include "flate.h"
|
29
|
+
|
30
|
+
#include <symbols.h>
|
31
|
+
|
32
|
+
#include <stdio.h>
|
33
|
+
|
34
|
+
char *data_dir = NULL;
|
35
|
+
|
36
|
+
VALUE cFM; /* the Tioga/FigureMaker class object */
|
37
|
+
|
38
|
+
static void FM_mark(FM *p) { /* all of the VALUEs in the FM struct should be marked */
|
39
|
+
rb_gc_mark(p->stroke_color);
|
40
|
+
rb_gc_mark(p->fill_color);
|
41
|
+
rb_gc_mark(p->line_type);
|
42
|
+
rb_gc_mark(p->title);
|
43
|
+
rb_gc_mark(p->title_color);
|
44
|
+
rb_gc_mark(p->xlabel);
|
45
|
+
rb_gc_mark(p->xlabel_color);
|
46
|
+
rb_gc_mark(p->ylabel);
|
47
|
+
rb_gc_mark(p->ylabel_color);
|
48
|
+
rb_gc_mark(p->xaxis_stroke_color);
|
49
|
+
rb_gc_mark(p->xaxis_locations_for_major_ticks);
|
50
|
+
rb_gc_mark(p->xaxis_locations_for_minor_ticks);
|
51
|
+
rb_gc_mark(p->yaxis_stroke_color);
|
52
|
+
rb_gc_mark(p->yaxis_locations_for_major_ticks);
|
53
|
+
rb_gc_mark(p->yaxis_locations_for_minor_ticks);
|
54
|
+
rb_gc_mark(p->fm);
|
55
|
+
}
|
56
|
+
|
57
|
+
static void FM_free(FM *p) {
|
58
|
+
free(p);
|
59
|
+
}
|
60
|
+
|
61
|
+
static VALUE FM_alloc(VALUE klass) {
|
62
|
+
FM *p;
|
63
|
+
VALUE ary = Data_Make_Struct(klass, FM, FM_mark, FM_free, p);
|
64
|
+
Initialize_Figure(ary);
|
65
|
+
p->fm = ary;
|
66
|
+
return ary;
|
67
|
+
}
|
68
|
+
|
69
|
+
bool Is_FM(VALUE fmkr) { return ( TYPE(fmkr) == T_DATA && RDATA(fmkr)->dfree == (RUBY_DATA_FUNC)FM_free ); }
|
70
|
+
|
71
|
+
FM *Get_FM(VALUE fmkr) {
|
72
|
+
FM *p;
|
73
|
+
Data_Get_Struct(fmkr, FM, p);
|
74
|
+
return p;
|
75
|
+
}
|
76
|
+
|
77
|
+
/* page attribute accessors */
|
78
|
+
RO_BOOL_ATTR(root_figure)
|
79
|
+
RO_BOOL_ATTR(in_subplot)
|
80
|
+
|
81
|
+
/* device page size accessors -- can set these using set_device_pagesize */
|
82
|
+
RO_DBL_ATTR(page_left)
|
83
|
+
RO_DBL_ATTR(page_bottom)
|
84
|
+
RO_DBL_ATTR(page_top)
|
85
|
+
RO_DBL_ATTR(page_right)
|
86
|
+
RO_DBL_ATTR(page_width)
|
87
|
+
RO_DBL_ATTR(page_height)
|
88
|
+
|
89
|
+
/* frame attribute accessors -- can set these using set_frame_sides */
|
90
|
+
RO_DBL_ATTR(frame_left)
|
91
|
+
RO_DBL_ATTR(frame_right)
|
92
|
+
RO_DBL_ATTR(frame_top)
|
93
|
+
RO_DBL_ATTR(frame_bottom)
|
94
|
+
RO_DBL_ATTR(frame_width)
|
95
|
+
RO_DBL_ATTR(frame_height)
|
96
|
+
|
97
|
+
/* bounds attribute accessors */
|
98
|
+
RO_DBL_ATTR(bounds_left)
|
99
|
+
RO_DBL_ATTR(bounds_right)
|
100
|
+
RO_DBL_ATTR(bounds_top)
|
101
|
+
RO_DBL_ATTR(bounds_bottom)
|
102
|
+
RO_DBL_ATTR(bounds_xmin)
|
103
|
+
RO_DBL_ATTR(bounds_xmax)
|
104
|
+
RO_DBL_ATTR(bounds_ymin)
|
105
|
+
RO_DBL_ATTR(bounds_ymax)
|
106
|
+
RO_DBL_ATTR(bounds_width)
|
107
|
+
RO_DBL_ATTR(bounds_height)
|
108
|
+
RO_BOOL_ATTR(xaxis_reversed)
|
109
|
+
RO_BOOL_ATTR(yaxis_reversed)
|
110
|
+
|
111
|
+
/* text attribute accessors */
|
112
|
+
RO_DBL_ATTR(default_font_size)
|
113
|
+
RO_DBL_ATTR(default_text_scale)
|
114
|
+
INT_ATTR(justification)
|
115
|
+
INT_ATTR(alignment)
|
116
|
+
RO_DBL_ATTR(default_text_height_dx)
|
117
|
+
RO_DBL_ATTR(default_text_height_dy)
|
118
|
+
DBL_ATTR(label_left_margin)
|
119
|
+
DBL_ATTR(label_right_margin)
|
120
|
+
DBL_ATTR(label_top_margin)
|
121
|
+
DBL_ATTR(label_bottom_margin)
|
122
|
+
DBL_ATTR(text_shift_on_left)
|
123
|
+
DBL_ATTR(text_shift_on_right)
|
124
|
+
DBL_ATTR(text_shift_on_top)
|
125
|
+
DBL_ATTR(text_shift_on_bottom)
|
126
|
+
DBL_ATTR(text_shift_from_x_origin)
|
127
|
+
DBL_ATTR(text_shift_from_y_origin)
|
128
|
+
|
129
|
+
/* graphics attribute accessors */
|
130
|
+
RO_DBL_ATTR(default_line_scale)
|
131
|
+
RO_VAL_ATTR(stroke_color)
|
132
|
+
RO_VAL_ATTR(fill_color)
|
133
|
+
RO_DBL_ATTR(line_width)
|
134
|
+
RO_INT_ATTR(line_cap)
|
135
|
+
RO_INT_ATTR(line_join)
|
136
|
+
RO_DBL_ATTR(miter_limit)
|
137
|
+
RO_DBL_ATTR(stroke_opacity)
|
138
|
+
RO_DBL_ATTR(fill_opacity)
|
139
|
+
RO_VAL_ATTR(line_type)
|
140
|
+
|
141
|
+
/* Title */
|
142
|
+
RO_BOOL_ATTR(title_visible)
|
143
|
+
VAL_ATTR(title)
|
144
|
+
INT_ATTR(title_side)
|
145
|
+
DBL_ATTR(title_position)
|
146
|
+
DBL_ATTR(title_scale)
|
147
|
+
DBL_ATTR(title_shift)
|
148
|
+
DBL_ATTR(title_angle)
|
149
|
+
INT_ATTR(title_alignment)
|
150
|
+
INT_ATTR(title_justification)
|
151
|
+
VAL_ATTR(title_color)
|
152
|
+
|
153
|
+
/* X label */
|
154
|
+
RO_BOOL_ATTR(xlabel_visible)
|
155
|
+
VAL_ATTR(xlabel)
|
156
|
+
DBL_ATTR(xlabel_position)
|
157
|
+
DBL_ATTR(xlabel_scale)
|
158
|
+
DBL_ATTR(xlabel_shift)
|
159
|
+
DBL_ATTR(xlabel_angle)
|
160
|
+
INT_ATTR(xlabel_side)
|
161
|
+
INT_ATTR(xlabel_alignment)
|
162
|
+
INT_ATTR(xlabel_justification)
|
163
|
+
VAL_ATTR(xlabel_color)
|
164
|
+
|
165
|
+
/* Y label */
|
166
|
+
RO_BOOL_ATTR(ylabel_visible)
|
167
|
+
VAL_ATTR(ylabel)
|
168
|
+
DBL_ATTR(ylabel_position)
|
169
|
+
DBL_ATTR(ylabel_scale)
|
170
|
+
DBL_ATTR(ylabel_shift)
|
171
|
+
DBL_ATTR(ylabel_angle)
|
172
|
+
INT_ATTR(ylabel_side)
|
173
|
+
INT_ATTR(ylabel_alignment)
|
174
|
+
INT_ATTR(ylabel_justification)
|
175
|
+
VAL_ATTR(ylabel_color)
|
176
|
+
|
177
|
+
/* X axis */
|
178
|
+
RO_BOOL_ATTR(xaxis_visible)
|
179
|
+
INT_ATTR(xaxis_loc)
|
180
|
+
INT_ATTR(xaxis_type)
|
181
|
+
DBL_ATTR(xaxis_line_width)
|
182
|
+
VAL_ATTR(xaxis_stroke_color)
|
183
|
+
DBL_ATTR(xaxis_major_tick_width)
|
184
|
+
DBL_ATTR(xaxis_minor_tick_width)
|
185
|
+
DBL_ATTR(xaxis_major_tick_length)
|
186
|
+
DBL_ATTR(xaxis_minor_tick_length)
|
187
|
+
BOOL_ATTR(xaxis_log_values)
|
188
|
+
BOOL_ATTR(xaxis_ticks_inside)
|
189
|
+
BOOL_ATTR(xaxis_ticks_outside)
|
190
|
+
DBL_ATTR(xaxis_tick_interval)
|
191
|
+
DBL_ATTR(xaxis_min_between_major_ticks)
|
192
|
+
INT_ATTR(xaxis_number_of_minor_intervals)
|
193
|
+
VAL_ATTR(xaxis_locations_for_major_ticks)
|
194
|
+
VAL_ATTR(xaxis_locations_for_minor_ticks)
|
195
|
+
BOOL_ATTR(xaxis_use_fixed_pt)
|
196
|
+
INT_ATTR(xaxis_digits_max)
|
197
|
+
VAL_ATTR(xaxis_tick_labels)
|
198
|
+
INT_ATTR(xaxis_numeric_label_decimal_digits)
|
199
|
+
DBL_ATTR(xaxis_numeric_label_scale)
|
200
|
+
DBL_ATTR(xaxis_numeric_label_shift)
|
201
|
+
DBL_ATTR(xaxis_numeric_label_angle)
|
202
|
+
INT_ATTR(xaxis_numeric_label_alignment)
|
203
|
+
INT_ATTR(xaxis_numeric_label_justification)
|
204
|
+
INT_ATTR(top_edge_type)
|
205
|
+
RO_BOOL_ATTR(top_edge_visible)
|
206
|
+
INT_ATTR(bottom_edge_type)
|
207
|
+
RO_BOOL_ATTR(bottom_edge_visible)
|
208
|
+
|
209
|
+
/* Y axis */
|
210
|
+
RO_BOOL_ATTR(yaxis_visible)
|
211
|
+
INT_ATTR(yaxis_loc)
|
212
|
+
INT_ATTR(yaxis_type)
|
213
|
+
DBL_ATTR(yaxis_line_width)
|
214
|
+
VAL_ATTR(yaxis_stroke_color)
|
215
|
+
DBL_ATTR(yaxis_major_tick_width)
|
216
|
+
DBL_ATTR(yaxis_minor_tick_width)
|
217
|
+
DBL_ATTR(yaxis_major_tick_length)
|
218
|
+
DBL_ATTR(yaxis_minor_tick_length)
|
219
|
+
BOOL_ATTR(yaxis_log_values)
|
220
|
+
BOOL_ATTR(yaxis_ticks_inside)
|
221
|
+
BOOL_ATTR(yaxis_ticks_outside)
|
222
|
+
DBL_ATTR(yaxis_tick_interval)
|
223
|
+
DBL_ATTR(yaxis_min_between_major_ticks)
|
224
|
+
INT_ATTR(yaxis_number_of_minor_intervals)
|
225
|
+
VAL_ATTR(yaxis_locations_for_major_ticks)
|
226
|
+
VAL_ATTR(yaxis_locations_for_minor_ticks)
|
227
|
+
BOOL_ATTR(yaxis_use_fixed_pt)
|
228
|
+
INT_ATTR(yaxis_digits_max)
|
229
|
+
VAL_ATTR(yaxis_tick_labels)
|
230
|
+
INT_ATTR(yaxis_numeric_label_decimal_digits)
|
231
|
+
DBL_ATTR(yaxis_numeric_label_scale)
|
232
|
+
DBL_ATTR(yaxis_numeric_label_shift)
|
233
|
+
DBL_ATTR(yaxis_numeric_label_angle)
|
234
|
+
INT_ATTR(yaxis_numeric_label_alignment)
|
235
|
+
INT_ATTR(yaxis_numeric_label_justification)
|
236
|
+
INT_ATTR(left_edge_type)
|
237
|
+
RO_BOOL_ATTR(left_edge_visible)
|
238
|
+
INT_ATTR(right_edge_type)
|
239
|
+
RO_BOOL_ATTR(right_edge_visible)
|
240
|
+
|
241
|
+
/* Legend */
|
242
|
+
DBL_ATTR(legend_text_width)
|
243
|
+
DBL_ATTR(legend_line_x0)
|
244
|
+
DBL_ATTR(legend_line_x1)
|
245
|
+
DBL_ATTR(legend_line_dy)
|
246
|
+
DBL_ATTR(legend_text_xstart)
|
247
|
+
DBL_ATTR(legend_text_ystart)
|
248
|
+
DBL_ATTR(legend_text_dy)
|
249
|
+
DBL_ATTR(legend_line_width)
|
250
|
+
DBL_ATTR(legend_scale)
|
251
|
+
INT_ATTR(legend_alignment)
|
252
|
+
INT_ATTR(legend_justification)
|
253
|
+
|
254
|
+
/* Debugging */
|
255
|
+
INT_ATTR(debug_verbosity_level)
|
256
|
+
|
257
|
+
/* Warning on non-ok numbers */
|
258
|
+
BOOL_ATTR(croak_on_nonok_numbers)
|
259
|
+
|
260
|
+
#define attr_reader(attr) rb_define_method(cFM, #attr , FM_##attr##_get, 0);
|
261
|
+
#define attr_writer(attr) rb_define_method(cFM, #attr "=", FM_##attr##_set, 1);
|
262
|
+
#define attr_accessors(attr) attr_reader(attr) attr_writer(attr)
|
263
|
+
|
264
|
+
void Init_FigureMaker(void) {
|
265
|
+
/* called by Ruby when the extension is loaded */
|
266
|
+
|
267
|
+
/* this function has been modified by Vincent Fourmond for the splitting
|
268
|
+
out of libraries more general than Tioga */
|
269
|
+
|
270
|
+
/*
|
271
|
+
Init_Flate();
|
272
|
+
Init_Dvector();
|
273
|
+
Init_Dtable();
|
274
|
+
*/
|
275
|
+
|
276
|
+
/* These functions don't belong here anymore, as they will be called
|
277
|
+
by their respective modules. Instead, we require them */
|
278
|
+
|
279
|
+
rb_require("Dobjects/Dvector");
|
280
|
+
rb_require("Dobjects/Dtable");
|
281
|
+
rb_require("Flate");
|
282
|
+
|
283
|
+
|
284
|
+
VALUE mTioga = rb_define_module("Tioga");
|
285
|
+
|
286
|
+
|
287
|
+
/* and now, we need to import Dobjects and Flate modules*/
|
288
|
+
VALUE mDobjects = rb_define_module("Dobjects");
|
289
|
+
VALUE mFlate = rb_define_module("Flate");
|
290
|
+
rb_include_module(mTioga, mDobjects);
|
291
|
+
rb_include_module(mTioga, mFlate);
|
292
|
+
|
293
|
+
cFM = rb_define_class_under(mTioga, "FigureMaker", rb_cObject);
|
294
|
+
|
295
|
+
/* This is necessary to get the tex preamble for the previews*/
|
296
|
+
rb_require("Tioga/TexPreamble.rb");
|
297
|
+
|
298
|
+
/* Inclusion of the external objects to get them easily */
|
299
|
+
rb_include_module(cFM, mDobjects);
|
300
|
+
rb_include_module(cFM, mFlate);
|
301
|
+
|
302
|
+
rb_define_alloc_func(cFM, FM_alloc);
|
303
|
+
Init_IDs();
|
304
|
+
Init_Font_Dictionary();
|
305
|
+
rb_define_method(cFM, "private_make", FM_private_make, 2);
|
306
|
+
rb_define_method(cFM, "get_save_filename", FM_get_save_filename, 1);
|
307
|
+
rb_define_method(cFM, "private_make_portfolio", FM_private_make_portfolio, 3);
|
308
|
+
|
309
|
+
/* page attribute accessors */
|
310
|
+
attr_reader(root_figure)
|
311
|
+
attr_reader(in_subplot)
|
312
|
+
attr_reader(page_left)
|
313
|
+
attr_reader(page_right)
|
314
|
+
attr_reader(page_bottom)
|
315
|
+
attr_reader(page_top)
|
316
|
+
attr_reader(page_width)
|
317
|
+
attr_reader(page_height)
|
318
|
+
/* frame attribute accessors */
|
319
|
+
attr_reader(frame_left)
|
320
|
+
attr_reader(frame_right)
|
321
|
+
attr_reader(frame_bottom)
|
322
|
+
attr_reader(frame_top)
|
323
|
+
attr_reader(frame_width)
|
324
|
+
attr_reader(frame_height)
|
325
|
+
/* bounds attribute accessors */
|
326
|
+
attr_reader(bounds_left)
|
327
|
+
attr_reader(bounds_right)
|
328
|
+
attr_reader(bounds_bottom)
|
329
|
+
attr_reader(bounds_top)
|
330
|
+
attr_reader(bounds_width)
|
331
|
+
attr_reader(bounds_height)
|
332
|
+
attr_reader(bounds_xmin)
|
333
|
+
attr_reader(bounds_xmax)
|
334
|
+
attr_reader(bounds_ymin)
|
335
|
+
attr_reader(bounds_ymax)
|
336
|
+
attr_reader(xaxis_reversed)
|
337
|
+
attr_reader(yaxis_reversed)
|
338
|
+
/* text attribute accessors */
|
339
|
+
attr_reader(default_font_size)
|
340
|
+
attr_reader(default_text_scale)
|
341
|
+
attr_accessors(justification)
|
342
|
+
attr_accessors(alignment)
|
343
|
+
attr_reader(default_text_height_dx)
|
344
|
+
attr_reader(default_text_height_dy)
|
345
|
+
attr_accessors(label_left_margin)
|
346
|
+
attr_accessors(label_right_margin)
|
347
|
+
attr_accessors(label_top_margin)
|
348
|
+
attr_accessors(label_bottom_margin)
|
349
|
+
attr_accessors(text_shift_on_left)
|
350
|
+
attr_accessors(text_shift_on_right)
|
351
|
+
attr_accessors(text_shift_on_top)
|
352
|
+
attr_accessors(text_shift_on_bottom)
|
353
|
+
attr_accessors(text_shift_from_x_origin)
|
354
|
+
attr_accessors(text_shift_from_y_origin)
|
355
|
+
/* graphics attribute accessors */
|
356
|
+
attr_reader(default_line_scale)
|
357
|
+
attr_accessors(stroke_color)
|
358
|
+
attr_accessors(fill_color)
|
359
|
+
attr_accessors(line_width)
|
360
|
+
attr_accessors(line_cap)
|
361
|
+
attr_accessors(line_join)
|
362
|
+
attr_accessors(miter_limit)
|
363
|
+
attr_accessors(stroke_opacity)
|
364
|
+
attr_accessors(fill_opacity)
|
365
|
+
attr_accessors(line_type)
|
366
|
+
/* croak on non ok */
|
367
|
+
attr_accessors(croak_on_nonok_numbers)
|
368
|
+
|
369
|
+
/* methods */
|
370
|
+
rb_define_method(cFM, "private_context", FM_private_context, 1);
|
371
|
+
rb_define_method(cFM, "private_set_bounds", FM_private_set_bounds, 4);
|
372
|
+
rb_define_method(cFM, "private_set_subframe", FM_private_set_subframe, 4);
|
373
|
+
rb_define_method(cFM, "doing_subfigure", FM_doing_subfigure, 0);
|
374
|
+
/* colors */
|
375
|
+
rb_define_method(cFM, "hls_to_rgb", FM_hls_to_rgb, 1);
|
376
|
+
rb_define_method(cFM, "rgb_to_hls", FM_rgb_to_hls, 1);
|
377
|
+
/* coordinate system conversions */
|
378
|
+
rb_define_method(cFM, "convert_inches_to_output", FM_convert_inches_to_output, 1);
|
379
|
+
rb_define_method(cFM, "convert_output_to_inches", FM_convert_output_to_inches, 1);
|
380
|
+
rb_define_method(cFM, "convert_mm_to_output", FM_convert_mm_to_output, 1);
|
381
|
+
rb_define_method(cFM, "convert_output_to_mm", FM_convert_output_to_mm, 1);
|
382
|
+
rb_define_method(cFM, "convert_page_to_output_x", FM_convert_page_to_output_x, 1);
|
383
|
+
rb_define_method(cFM, "convert_page_to_output_y", FM_convert_page_to_output_y, 1);
|
384
|
+
rb_define_method(cFM, "convert_page_to_output_dx", FM_convert_page_to_output_dx, 1);
|
385
|
+
rb_define_method(cFM, "convert_page_to_output_dy", FM_convert_page_to_output_dy, 1);
|
386
|
+
rb_define_method(cFM, "convert_output_to_page_x", FM_convert_output_to_page_x, 1);
|
387
|
+
rb_define_method(cFM, "convert_output_to_page_y", FM_convert_output_to_page_y, 1);
|
388
|
+
rb_define_method(cFM, "convert_output_to_page_dx", FM_convert_output_to_page_dx, 1);
|
389
|
+
rb_define_method(cFM, "convert_output_to_page_dy", FM_convert_output_to_page_dy, 1);
|
390
|
+
rb_define_method(cFM, "convert_page_to_frame_x", FM_convert_page_to_frame_x, 1);
|
391
|
+
rb_define_method(cFM, "convert_page_to_frame_y", FM_convert_page_to_frame_y, 1);
|
392
|
+
rb_define_method(cFM, "convert_page_to_frame_dx", FM_convert_page_to_frame_dx, 1);
|
393
|
+
rb_define_method(cFM, "convert_page_to_frame_dy", FM_convert_page_to_frame_dy, 1);
|
394
|
+
rb_define_method(cFM, "convert_frame_to_page_x", FM_convert_frame_to_page_x, 1);
|
395
|
+
rb_define_method(cFM, "convert_frame_to_page_y", FM_convert_frame_to_page_y, 1);
|
396
|
+
rb_define_method(cFM, "convert_frame_to_page_dx", FM_convert_frame_to_page_dx, 1);
|
397
|
+
rb_define_method(cFM, "convert_frame_to_page_dy", FM_convert_frame_to_page_dy, 1);
|
398
|
+
rb_define_method(cFM, "convert_figure_to_frame_x", FM_convert_figure_to_frame_x, 1);
|
399
|
+
rb_define_method(cFM, "convert_figure_to_frame_y", FM_convert_figure_to_frame_y, 1);
|
400
|
+
rb_define_method(cFM, "convert_figure_to_frame_dx", FM_convert_figure_to_frame_dx, 1);
|
401
|
+
rb_define_method(cFM, "convert_figure_to_frame_dy", FM_convert_figure_to_frame_dy, 1);
|
402
|
+
rb_define_method(cFM, "convert_frame_to_figure_x", FM_convert_frame_to_figure_x, 1);
|
403
|
+
rb_define_method(cFM, "convert_frame_to_figure_y", FM_convert_frame_to_figure_y, 1);
|
404
|
+
rb_define_method(cFM, "convert_frame_to_figure_dx", FM_convert_frame_to_figure_dx, 1);
|
405
|
+
rb_define_method(cFM, "convert_frame_to_figure_dy", FM_convert_frame_to_figure_dy, 1);
|
406
|
+
rb_define_method(cFM, "convert_figure_to_output_x", FM_convert_figure_to_output_x, 1);
|
407
|
+
rb_define_method(cFM, "convert_figure_to_output_y", FM_convert_figure_to_output_y, 1);
|
408
|
+
rb_define_method(cFM, "convert_figure_to_output_dx", FM_convert_figure_to_output_dx, 1);
|
409
|
+
rb_define_method(cFM, "convert_figure_to_output_dy", FM_convert_figure_to_output_dy, 1);
|
410
|
+
rb_define_method(cFM, "convert_output_to_figure_x", FM_convert_output_to_figure_x, 1);
|
411
|
+
rb_define_method(cFM, "convert_output_to_figure_y", FM_convert_output_to_figure_y, 1);
|
412
|
+
rb_define_method(cFM, "convert_output_to_figure_dx", FM_convert_output_to_figure_dx, 1);
|
413
|
+
rb_define_method(cFM, "convert_output_to_figuret_dy", FM_convert_output_to_figure_dy, 1);
|
414
|
+
rb_define_method(cFM, "convert_to_degrees", FM_convert_to_degrees, 2);
|
415
|
+
/* text */
|
416
|
+
rb_define_method(cFM, "private_set_default_font_size", FM_private_set_default_font_size, 1);
|
417
|
+
rb_define_method(cFM, "rescale_text", FM_rescale_text, 1);
|
418
|
+
rb_define_method(cFM, "show_rotated_text", FM_show_rotated_text, 8);
|
419
|
+
rb_define_method(cFM, "show_rotated_label", FM_show_rotated_label, 7);
|
420
|
+
rb_define_method(cFM, "check_label_clip", FM_check_label_clip, 2);
|
421
|
+
/* path construction */
|
422
|
+
rb_define_method(cFM, "move_to_point", FM_move_to_point, 2);
|
423
|
+
rb_define_method(cFM, "append_point_to_path", FM_append_point_to_path, 2);
|
424
|
+
rb_define_method(cFM, "append_curve_to_path", FM_append_curve_to_path, 6);
|
425
|
+
rb_define_method(cFM, "close_path", FM_close_path, 0);
|
426
|
+
rb_define_method(cFM, "append_points_to_path", FM_append_points_to_path, 2);
|
427
|
+
rb_define_method(cFM, "private_append_points_with_gaps_to_path", FM_private_append_points_with_gaps_to_path, 4);
|
428
|
+
rb_define_method(cFM, "append_arc_to_path", FM_append_arc_to_path, 8);
|
429
|
+
rb_define_method(cFM, "append_rect_to_path", FM_append_rect_to_path, 4);
|
430
|
+
rb_define_method(cFM, "append_rounded_rect_to_path", FM_append_rounded_rect_to_path, 6);
|
431
|
+
rb_define_method(cFM, "append_circle_to_path", FM_append_circle_to_path, 3);
|
432
|
+
rb_define_method(cFM, "append_oval_to_path", FM_append_oval_to_path, 5);
|
433
|
+
rb_define_method(cFM, "append_frame_to_path", FM_append_frame_to_path, 0);
|
434
|
+
rb_define_method(cFM, "update_bbox", FM_update_bbox, 2);
|
435
|
+
rb_define_method(cFM, "bbox_left", FM_bbox_left, 0);
|
436
|
+
rb_define_method(cFM, "bbox_right", FM_bbox_right, 0);
|
437
|
+
rb_define_method(cFM, "bbox_top", FM_bbox_top, 0);
|
438
|
+
rb_define_method(cFM, "bbox_bottom", FM_bbox_bottom, 0);
|
439
|
+
/* path painting */
|
440
|
+
rb_define_method(cFM, "rescale_lines", FM_rescale_lines, 1);
|
441
|
+
rb_define_method(cFM, "discard_path", FM_discard_path, 0);
|
442
|
+
rb_define_method(cFM, "stroke", FM_stroke, 0);
|
443
|
+
rb_define_method(cFM, "close_and_stroke", FM_close_and_stroke, 0);
|
444
|
+
rb_define_method(cFM, "fill", FM_fill, 0);
|
445
|
+
rb_define_method(cFM, "eofill", FM_eofill, 0);
|
446
|
+
rb_define_method(cFM, "fill_and_stroke", FM_fill_and_stroke, 0);
|
447
|
+
rb_define_method(cFM, "eofill_and_stroke", FM_eofill_and_stroke, 0);
|
448
|
+
rb_define_method(cFM, "close_fill_and_stroke", FM_close_fill_and_stroke, 0);
|
449
|
+
rb_define_method(cFM, "close_eofill_and_stroke", FM_close_eofill_and_stroke, 0);
|
450
|
+
rb_define_method(cFM, "clip", FM_clip, 0);
|
451
|
+
rb_define_method(cFM, "eoclip", FM_eoclip, 0);
|
452
|
+
|
453
|
+
rb_define_method(cFM, "stroke_line", FM_stroke_line, 4);
|
454
|
+
rb_define_method(cFM, "fill_rect", FM_fill_rect, 4);
|
455
|
+
rb_define_method(cFM, "stroke_rect", FM_stroke_rect, 4);
|
456
|
+
rb_define_method(cFM, "fill_and_stroke_rect", FM_fill_and_stroke_rect, 4);
|
457
|
+
rb_define_method(cFM, "clip_rect", FM_clip_rect, 4);
|
458
|
+
rb_define_method(cFM, "stroke_frame", FM_stroke_frame, 0);
|
459
|
+
rb_define_method(cFM, "fill_frame", FM_fill_frame, 0);
|
460
|
+
rb_define_method(cFM, "fill_and_stroke_frame", FM_fill_and_stroke_frame, 0);
|
461
|
+
rb_define_method(cFM, "clip_circle", FM_clip_circle, 3);
|
462
|
+
rb_define_method(cFM, "clip_to_frame", FM_clip_to_frame, 0);
|
463
|
+
rb_define_method(cFM, "fill_circle", FM_fill_circle, 3);
|
464
|
+
rb_define_method(cFM, "stroke_circle", FM_stroke_circle, 3);
|
465
|
+
rb_define_method(cFM, "fill_and_stroke_circle", FM_fill_and_stroke_circle, 3);
|
466
|
+
rb_define_method(cFM, "clip_oval", FM_clip_oval, 5);
|
467
|
+
rb_define_method(cFM, "fill_oval", FM_fill_oval, 5);
|
468
|
+
rb_define_method(cFM, "stroke_oval", FM_stroke_oval, 5);
|
469
|
+
rb_define_method(cFM, "fill_and_stroke_oval", FM_fill_and_stroke_oval, 5);
|
470
|
+
rb_define_method(cFM, "rounded_rect_oval", FM_clip_rounded_rect, 6);
|
471
|
+
rb_define_method(cFM, "fill_rounded_rect", FM_fill_rounded_rect, 6);
|
472
|
+
rb_define_method(cFM, "stroke_rounded_rect", FM_stroke_rounded_rect, 6);
|
473
|
+
rb_define_method(cFM, "fill_and_stroke_rounded_rect", FM_fill_and_stroke_rounded_rect, 6);
|
474
|
+
/* shading */
|
475
|
+
rb_define_method(cFM, "private_axial_shading", FM_private_axial_shading, 7);
|
476
|
+
rb_define_method(cFM, "private_radial_shading", FM_private_radial_shading, 13);
|
477
|
+
/* markers */
|
478
|
+
rb_define_method(cFM, "register_font", FM_register_font, 1);
|
479
|
+
rb_define_method(cFM, "private_show_marker", FM_private_show_marker, 15);
|
480
|
+
rb_define_method(cFM, "marker_string_info", FM_marker_string_info, 3);
|
481
|
+
/* images */
|
482
|
+
rb_define_method(cFM, "private_show_jpg", FM_private_show_jpg, 5);
|
483
|
+
rb_define_method(cFM, "private_show_rgb_image", FM_private_show_rgb_image, 11);
|
484
|
+
rb_define_method(cFM, "private_show_cmyk_image", FM_private_show_rgb_image, 11);
|
485
|
+
rb_define_method(cFM, "private_show_grayscale_image", FM_private_show_grayscale_image, 11);
|
486
|
+
rb_define_method(cFM, "private_show_monochrome_image", FM_private_show_monochrome_image, 12);
|
487
|
+
rb_define_method(cFM, "private_show_image", FM_private_show_image, 15);
|
488
|
+
rb_define_method(cFM, "private_create_image_data", FM_private_create_image_data, 10);
|
489
|
+
rb_define_method(cFM, "private_create_monochrome_image_data", FM_private_create_monochrome_image_data, 7);
|
490
|
+
/* colormaps */
|
491
|
+
rb_define_method(cFM, "private_create_colormap", FM_private_create_colormap, 6);
|
492
|
+
rb_define_method(cFM, "convert_to_colormap", FM_convert_to_colormap, 3);
|
493
|
+
rb_define_method(cFM, "get_color_from_colormap", FM_get_color_from_colormap, 2);
|
494
|
+
/* plots */
|
495
|
+
rb_define_method(cFM, "set_frame_sides", FM_set_frame_sides, 4);
|
496
|
+
rb_define_method(cFM, "set_device_pagesize", FM_set_device_pagesize, 2);
|
497
|
+
rb_define_method(cFM, "doing_subplot", FM_doing_subplot, 0);
|
498
|
+
rb_define_method(cFM, "show_axis", FM_show_axis, 1);
|
499
|
+
rb_define_method(cFM, "show_edge", FM_show_edge, 1);
|
500
|
+
rb_define_method(cFM, "no_title", FM_no_title, 0);
|
501
|
+
rb_define_method(cFM, "no_xlabel", FM_no_xlabel, 0);
|
502
|
+
rb_define_method(cFM, "no_ylabel", FM_no_ylabel, 0);
|
503
|
+
rb_define_method(cFM, "no_xaxis", FM_no_xaxis, 0);
|
504
|
+
rb_define_method(cFM, "no_yaxis", FM_no_yaxis, 0);
|
505
|
+
rb_define_method(cFM, "no_left_edge", FM_no_left_edge, 0);
|
506
|
+
rb_define_method(cFM, "no_right_edge", FM_no_right_edge, 0);
|
507
|
+
rb_define_method(cFM, "no_top_edge", FM_no_top_edge, 0);
|
508
|
+
rb_define_method(cFM, "no_bottom_edge", FM_no_bottom_edge, 0);
|
509
|
+
/* makers */
|
510
|
+
rb_define_method(cFM, "private_make_contour", FM_private_make_contour, 9);
|
511
|
+
rb_define_method(cFM, "private_make_spline_interpolated_points", FM_private_make_spline_interpolated_points, 6);
|
512
|
+
rb_define_method(cFM, "private_make_steps", FM_private_make_steps, 8);
|
513
|
+
|
514
|
+
/* Title */
|
515
|
+
attr_reader(title_visible)
|
516
|
+
attr_accessors(title)
|
517
|
+
attr_accessors(title_side)
|
518
|
+
attr_accessors(title_position)
|
519
|
+
attr_accessors(title_scale)
|
520
|
+
attr_accessors(title_shift)
|
521
|
+
attr_accessors(title_angle)
|
522
|
+
attr_accessors(title_alignment)
|
523
|
+
attr_accessors(title_justification)
|
524
|
+
attr_accessors(title_color)
|
525
|
+
|
526
|
+
/* X label */
|
527
|
+
attr_reader(xlabel_visible)
|
528
|
+
attr_accessors(xlabel)
|
529
|
+
attr_accessors(xlabel_position)
|
530
|
+
attr_accessors(xlabel_scale)
|
531
|
+
attr_accessors(xlabel_shift)
|
532
|
+
attr_accessors(xlabel_angle)
|
533
|
+
attr_accessors(xlabel_side)
|
534
|
+
attr_accessors(xlabel_alignment)
|
535
|
+
attr_accessors(xlabel_justification)
|
536
|
+
attr_accessors(xlabel_color)
|
537
|
+
|
538
|
+
/* Y label */
|
539
|
+
attr_reader(ylabel_visible)
|
540
|
+
attr_accessors(ylabel)
|
541
|
+
attr_accessors(ylabel_position)
|
542
|
+
attr_accessors(ylabel_scale)
|
543
|
+
attr_accessors(ylabel_shift)
|
544
|
+
attr_accessors(ylabel_angle)
|
545
|
+
attr_accessors(ylabel_side)
|
546
|
+
attr_accessors(ylabel_alignment)
|
547
|
+
attr_accessors(ylabel_justification)
|
548
|
+
attr_accessors(ylabel_color)
|
549
|
+
|
550
|
+
/* X axis */
|
551
|
+
attr_reader(xaxis_visible)
|
552
|
+
attr_accessors(xaxis_loc)
|
553
|
+
attr_accessors(xaxis_type)
|
554
|
+
attr_accessors(xaxis_line_width)
|
555
|
+
attr_accessors(xaxis_stroke_color)
|
556
|
+
attr_accessors(xaxis_major_tick_width)
|
557
|
+
attr_accessors(xaxis_minor_tick_width)
|
558
|
+
attr_accessors(xaxis_major_tick_length)
|
559
|
+
attr_accessors(xaxis_minor_tick_length)
|
560
|
+
attr_accessors(xaxis_log_values)
|
561
|
+
attr_accessors(xaxis_ticks_inside)
|
562
|
+
attr_accessors(xaxis_ticks_outside)
|
563
|
+
attr_accessors(xaxis_tick_interval)
|
564
|
+
attr_accessors(xaxis_min_between_major_ticks)
|
565
|
+
attr_accessors(xaxis_number_of_minor_intervals)
|
566
|
+
attr_accessors(xaxis_locations_for_major_ticks)
|
567
|
+
attr_accessors(xaxis_locations_for_minor_ticks)
|
568
|
+
attr_accessors(xaxis_use_fixed_pt)
|
569
|
+
attr_accessors(xaxis_digits_max)
|
570
|
+
attr_accessors(xaxis_tick_labels)
|
571
|
+
attr_accessors(xaxis_numeric_label_decimal_digits)
|
572
|
+
attr_accessors(xaxis_numeric_label_scale)
|
573
|
+
attr_accessors(xaxis_numeric_label_shift)
|
574
|
+
attr_accessors(xaxis_numeric_label_angle)
|
575
|
+
attr_accessors(xaxis_numeric_label_alignment)
|
576
|
+
attr_accessors(xaxis_numeric_label_justification)
|
577
|
+
attr_accessors(top_edge_type)
|
578
|
+
attr_reader(top_edge_visible)
|
579
|
+
attr_accessors(bottom_edge_type)
|
580
|
+
attr_reader(bottom_edge_visible)
|
581
|
+
|
582
|
+
/* Y axis */
|
583
|
+
attr_reader(yaxis_visible)
|
584
|
+
attr_accessors(yaxis_loc)
|
585
|
+
attr_accessors(yaxis_type)
|
586
|
+
attr_accessors(yaxis_line_width)
|
587
|
+
attr_accessors(yaxis_stroke_color)
|
588
|
+
attr_accessors(yaxis_major_tick_width)
|
589
|
+
attr_accessors(yaxis_minor_tick_width)
|
590
|
+
attr_accessors(yaxis_major_tick_length)
|
591
|
+
attr_accessors(yaxis_minor_tick_length)
|
592
|
+
attr_accessors(yaxis_log_values)
|
593
|
+
attr_accessors(yaxis_ticks_inside)
|
594
|
+
attr_accessors(yaxis_ticks_outside)
|
595
|
+
attr_accessors(yaxis_tick_interval)
|
596
|
+
attr_accessors(yaxis_min_between_major_ticks)
|
597
|
+
attr_accessors(yaxis_number_of_minor_intervals)
|
598
|
+
attr_accessors(yaxis_locations_for_major_ticks)
|
599
|
+
attr_accessors(yaxis_locations_for_minor_ticks)
|
600
|
+
attr_accessors(yaxis_use_fixed_pt)
|
601
|
+
attr_accessors(yaxis_digits_max)
|
602
|
+
attr_accessors(yaxis_tick_labels)
|
603
|
+
attr_accessors(yaxis_numeric_label_decimal_digits)
|
604
|
+
attr_accessors(yaxis_numeric_label_scale)
|
605
|
+
attr_accessors(yaxis_numeric_label_shift)
|
606
|
+
attr_accessors(yaxis_numeric_label_angle)
|
607
|
+
attr_accessors(yaxis_numeric_label_alignment)
|
608
|
+
attr_accessors(yaxis_numeric_label_justification)
|
609
|
+
attr_accessors(left_edge_type)
|
610
|
+
attr_reader(left_edge_visible)
|
611
|
+
attr_accessors(right_edge_type)
|
612
|
+
attr_reader(right_edge_visible)
|
613
|
+
|
614
|
+
/* Legend */
|
615
|
+
attr_accessors(legend_text_width)
|
616
|
+
attr_accessors(legend_line_x0)
|
617
|
+
attr_accessors(legend_line_x1)
|
618
|
+
attr_accessors(legend_line_dy)
|
619
|
+
attr_accessors(legend_text_xstart)
|
620
|
+
attr_accessors(legend_text_ystart)
|
621
|
+
attr_accessors(legend_text_dy)
|
622
|
+
attr_accessors(legend_line_width)
|
623
|
+
attr_accessors(legend_scale)
|
624
|
+
attr_accessors(legend_alignment)
|
625
|
+
attr_accessors(legend_justification)
|
626
|
+
|
627
|
+
/* Debugging */
|
628
|
+
attr_accessors(debug_verbosity_level)
|
629
|
+
|
630
|
+
rb_require("Tioga/FigMkr.rb");
|
631
|
+
/* We now need to import the symbols */
|
632
|
+
|
633
|
+
/* imports from Dvector */
|
634
|
+
VALUE cDvector = rb_define_class_under(mDobjects, "Dvector", rb_cObject);
|
635
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Create);
|
636
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Data_Resize);
|
637
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Data_Replace);
|
638
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Data_for_Read);
|
639
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Data_for_Write);
|
640
|
+
RB_IMPORT_SYMBOL(cDvector, Dvector_Store_Double);
|
641
|
+
RB_IMPORT_SYMBOL(cDvector, c_dvector_spline_interpolate);
|
642
|
+
RB_IMPORT_SYMBOL(cDvector, c_dvector_linear_interpolate);
|
643
|
+
RB_IMPORT_SYMBOL(cDvector, c_dvector_create_spline_interpolant);
|
644
|
+
|
645
|
+
/* imports from Flate */
|
646
|
+
RB_IMPORT_SYMBOL(mFlate, flate_compress);
|
647
|
+
RB_IMPORT_SYMBOL(mFlate, flate_expand);
|
648
|
+
|
649
|
+
/* imports from Dtable */
|
650
|
+
VALUE cDtable = rb_define_class_under(mDobjects, "Dtable", rb_cObject);
|
651
|
+
RB_IMPORT_SYMBOL(cDtable, Dtable_Ptr);
|
652
|
+
RB_IMPORT_SYMBOL(cDtable, Read_Dtable);
|
653
|
+
}
|
654
|
+
|
655
|
+
/* implementation of the various functions */
|
656
|
+
IMPLEMENT_SYMBOL(Dvector_Create);
|
657
|
+
IMPLEMENT_SYMBOL(Dvector_Data_Resize);
|
658
|
+
IMPLEMENT_SYMBOL(Dvector_Data_Replace);
|
659
|
+
IMPLEMENT_SYMBOL(Dvector_Data_for_Read);
|
660
|
+
IMPLEMENT_SYMBOL(Dvector_Data_for_Write);
|
661
|
+
IMPLEMENT_SYMBOL(Dvector_Store_Double);
|
662
|
+
IMPLEMENT_SYMBOL(c_dvector_spline_interpolate);
|
663
|
+
IMPLEMENT_SYMBOL(c_dvector_linear_interpolate);
|
664
|
+
IMPLEMENT_SYMBOL(c_dvector_create_spline_interpolant);
|
665
|
+
|
666
|
+
IMPLEMENT_SYMBOL(flate_compress);
|
667
|
+
IMPLEMENT_SYMBOL(flate_expand);
|
668
|
+
|
669
|
+
IMPLEMENT_SYMBOL(Dtable_Ptr);
|
670
|
+
IMPLEMENT_SYMBOL(Read_Dtable);
|
671
|
+
|
672
|
+
|