tioga 1.8 → 1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Tioga_README +46 -11
- data/split/Dtable/dtable.c +2 -2
- data/split/Dtable/dvector.h +8 -0
- data/split/Dtable/namespace.h +16 -8
- data/split/Dtable/symbols.h +1 -1
- data/split/Dvector/dvector.c +77 -2
- data/split/Dvector/dvector_intern.h +2 -0
- data/split/Dvector/include/dvector.h +8 -0
- data/split/Dvector/lib/Dvector_extras.rb +12 -0
- data/split/Dvector/namespace.h +16 -8
- data/split/Dvector/symbols.h +1 -1
- data/split/Flate/namespace.h +16 -8
- data/split/Flate/symbols.h +1 -1
- data/split/Function/dvector.h +8 -0
- data/split/Function/function.c +2 -1
- data/split/Function/namespace.h +16 -8
- data/split/Function/symbols.h +1 -1
- data/split/Tioga/axes.c +217 -75
- data/split/Tioga/dvector.h +8 -0
- data/split/Tioga/figures.c +19 -2
- data/split/Tioga/figures.h +7 -6
- data/split/Tioga/generic.c +14 -1
- data/split/Tioga/generic.h +13 -0
- data/split/Tioga/init.c +5 -9
- data/split/Tioga/lib/Colormaps.rb +33 -2
- data/split/Tioga/lib/Doc.rb +30 -0
- data/split/Tioga/lib/Executive.rb +4 -2
- data/split/Tioga/lib/FigMkr.rb +219 -53
- data/split/Tioga/lib/Figures_and_Plots.rb +7 -0
- data/split/Tioga/lib/Images.rb +10 -2
- data/split/Tioga/lib/Legends.rb +7 -3
- data/split/Tioga/lib/Markers.rb +7 -0
- data/split/Tioga/lib/TexPreamble.rb +56 -56
- data/split/Tioga/lib/Utils.rb +7 -0
- data/split/Tioga/lib/maker.rb +1 -0
- data/split/Tioga/lib/tioga_ui_cmds.rb +6 -5
- data/split/Tioga/namespace.h +16 -8
- data/split/Tioga/pdfcolor.c +63 -7
- data/split/Tioga/pdfcoords.c +0 -16
- data/split/Tioga/pdfimage.c +16 -2
- data/split/Tioga/pdfs.h +1 -0
- data/split/Tioga/pdftext.c +223 -82
- data/split/Tioga/symbols.h +1 -1
- data/split/Tioga/texout.c +1 -1
- data/split/Tioga/wrappers.c +21 -10
- data/split/Tioga/wrappers.h +5 -0
- data/split/extconf.rb +27 -15
- data/split/namespace.h +16 -8
- data/split/scripts/tioga +0 -0
- data/split/symbols.h +1 -1
- data/tests/Icon_Test.pdf +0 -0
- data/tests/tc_Dvector.rb +24 -0
- metadata +38 -37
@@ -17,6 +17,13 @@ class Figures_and_Plots < Doc < FigureMaker
|
|
17
17
|
def show_plot(bounds=nil,&cmd)
|
18
18
|
end
|
19
19
|
|
20
|
+
# :call-seq:
|
21
|
+
# show_plot_without_clipping(bounds) do ... end
|
22
|
+
#
|
23
|
+
# This is identical to show_plot except it doesn't do #clip_to_frame before calling the plot command.
|
24
|
+
def show_plot_without_clipping(bounds=nil,&cmd)
|
25
|
+
end
|
26
|
+
|
20
27
|
# :call-seq:
|
21
28
|
# context do ... end
|
22
29
|
#
|
data/split/Tioga/lib/Images.rb
CHANGED
@@ -44,11 +44,19 @@ grayscale images is stored using one byte per sample. The routine create_monoch
|
|
44
44
|
a handy way to create such data from a table of values.
|
45
45
|
|
46
46
|
Grayscale images can also be used as a "soft mask" for other images. In this case, the grayscale samples
|
47
|
-
are interpreted as relative opacities (a stencil mask, on the other hand, is "hard" in that each
|
47
|
+
are interpreted as relative opacities (a stencil mask, on the other hand, is "hard" in that each
|
48
|
+
sample is either totally opaque or totally transparent). To use such soft masking, create a dictionary for the grayscale
|
48
49
|
image and provide it as the 'opacity_mask' entry for the image be be masked.
|
49
50
|
|
50
51
|
The 'color_space' entry is 'RGB' or 'rgb' for an image using the red-green-blue representation. Samples
|
51
|
-
are stored as three bytes, corresponding to red, green, and blue intensities
|
52
|
+
are stored as three bytes, corresponding to red, green, and blue intensities
|
53
|
+
(e.g., red intensity in range 0.0 to 1.0 is stored as round(red*255)).
|
54
|
+
|
55
|
+
If the 'color_space' entry is 'HLS' or 'hls', then samples
|
56
|
+
are stored as three bytes, corresponding to hue, lightness, and saturation
|
57
|
+
(the hue angle in the range 0.0 to 360.0 is stored as round(hue*256/360)).
|
58
|
+
[Note: internally, the hls data is copied and converted to rgb -- see string_hls_to_rgb.]
|
59
|
+
|
52
60
|
In 4-color printing, as in ink-jet printers, images are painted using cyan, magenta, yellow, and black inks.
|
53
61
|
The corresponding 'color_space' is 'CMYK' or 'cmyk'. For this case, samples are stored as four bytes,
|
54
62
|
corresponding to cyan, magenta, yellow, and black intensitites.
|
data/split/Tioga/lib/Legends.rb
CHANGED
@@ -25,10 +25,14 @@ class Legends < Doc < FigureMaker
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# :call-seq:
|
28
|
-
# show_legend
|
28
|
+
# show_legend(legend_background_function=nil)
|
29
29
|
#
|
30
|
-
# Shows the legend in the current frame.
|
31
|
-
|
30
|
+
# Shows the legend in the current frame. If given a function arguement,
|
31
|
+
# it calls the function with bounds [left, right, top, bottom] for the
|
32
|
+
# rectangle where the legend will be shown. You can use this opportunity
|
33
|
+
# to provide a background for the legend info and a frame around it too
|
34
|
+
# if you'd like.
|
35
|
+
def show_legend(legend_background_function=nil)
|
32
36
|
end
|
33
37
|
|
34
38
|
=begin rdoc
|
data/split/Tioga/lib/Markers.rb
CHANGED
@@ -65,6 +65,13 @@ Dictionary Entries
|
|
65
65
|
'stroke_width' => a_float # to be used for stroked markers
|
66
66
|
'mode' # alias for 'rendering_mode'
|
67
67
|
'legend' => a_dict or a_string # for adding marker to legend
|
68
|
+
|
69
|
+
You can provide a list of markers as the value of the 'marker' entry in the dictionary. In this
|
70
|
+
case, the show_marker routine will go through the list of markers using one per point. If there
|
71
|
+
are more points than markers, it will cycle through the list of markers repeatedly. Similarly,
|
72
|
+
you can provide a list of colors for 'color', 'fill_color', or 'stroke_color', and a list of
|
73
|
+
numbers for 'font', 'angle', 'scale', 'horizontal_scale', 'vertical_scale', 'italic_angle', 'ascent_angle',
|
74
|
+
or 'stroke_width'.
|
68
75
|
|
69
76
|
|
70
77
|
Examples
|
@@ -170,38 +170,6 @@ module Tioga
|
|
170
170
|
End_of_preamble
|
171
171
|
COLOR_PREAMBLE = <<'End_of_preamble'
|
172
172
|
% Color constants, generated from ColorConstants.rb
|
173
|
-
\definecolor{CornflowerBlue}{rgb}{0.392,0.585,0.930}
|
174
|
-
\definecolor{NavajoWhite}{rgb}{1.000,0.870,0.680}
|
175
|
-
\definecolor{Fuchsia}{rgb}{1.000,0.000,1.000}
|
176
|
-
\definecolor{Seashell}{rgb}{1.000,0.960,0.932}
|
177
|
-
\definecolor{LightPlum}{rgb}{0.800,0.600,0.800}
|
178
|
-
\definecolor{Lime}{rgb}{0.000,1.000,0.000}
|
179
|
-
\definecolor{DarkOliveGreen}{rgb}{0.332,0.420,0.185}
|
180
|
-
\definecolor{Periwinkle}{rgb}{0.600,0.000,1.000}
|
181
|
-
\definecolor{IndianRed}{rgb}{0.804,0.360,0.360}
|
182
|
-
\definecolor{Aqua}{rgb}{0.000,1.000,1.000}
|
183
|
-
\definecolor{Thistle}{rgb}{0.848,0.750,0.848}
|
184
|
-
\definecolor{MediumSpringGreen}{rgb}{0.000,0.980,0.604}
|
185
|
-
\definecolor{DarkViolet}{rgb}{0.580,0.000,0.828}
|
186
|
-
\definecolor{RoyalBlue}{rgb}{0.255,0.410,0.884}
|
187
|
-
\definecolor{LightDullGreen}{rgb}{0.400,1.000,0.600}
|
188
|
-
\definecolor{Brown}{rgb}{0.648,0.165,0.165}
|
189
|
-
\definecolor{DarkChocolate}{rgb}{0.400,0.200,0.000}
|
190
|
-
\definecolor{Orange}{rgb}{1.000,0.648,0.000}
|
191
|
-
\definecolor{Goldenrod}{rgb}{0.855,0.648,0.125}
|
192
|
-
\definecolor{SlateGray}{rgb}{0.440,0.500,0.565}
|
193
|
-
\definecolor{LightSienna}{rgb}{0.800,0.400,0.000}
|
194
|
-
\definecolor{DarkRed}{rgb}{0.545,0.000,0.000}
|
195
|
-
\definecolor{Pumpkin}{rgb}{1.000,0.600,0.200}
|
196
|
-
\definecolor{LavenderBlue}{rgb}{0.400,0.200,1.000}
|
197
|
-
\definecolor{Bisque}{rgb}{1.000,0.894,0.770}
|
198
|
-
\definecolor{Wheat}{rgb}{0.960,0.870,0.700}
|
199
|
-
\definecolor{Mauve}{rgb}{0.800,0.200,0.400}
|
200
|
-
\definecolor{MintCream}{rgb}{0.960,1.000,0.980}
|
201
|
-
\definecolor{DodgerBlue}{rgb}{0.116,0.565,1.000}
|
202
|
-
\definecolor{Salmon}{rgb}{0.980,0.500,0.448}
|
203
|
-
\definecolor{LightGrey}{rgb}{0.828,0.828,0.828}
|
204
|
-
\definecolor{Chartreuse}{rgb}{0.498,1.000,0.000}
|
205
173
|
\definecolor{PaleTurquoise}{rgb}{0.688,0.932,0.932}
|
206
174
|
\definecolor{GreenYellow}{rgb}{0.680,1.000,0.185}
|
207
175
|
\definecolor{SpringGreen}{rgb}{0.000,1.000,0.498}
|
@@ -212,11 +180,11 @@ End_of_preamble
|
|
212
180
|
\definecolor{LightBrightGreen}{rgb}{0.000,0.800,0.200}
|
213
181
|
\definecolor{BlueViolet}{rgb}{0.540,0.170,0.888}
|
214
182
|
\definecolor{MediumOrchid}{rgb}{0.730,0.332,0.828}
|
183
|
+
\definecolor{Navy}{rgb}{0.000,0.000,0.500}
|
215
184
|
\definecolor{Gainsboro}{rgb}{0.864,0.864,0.864}
|
216
185
|
\definecolor{Sienna}{rgb}{0.628,0.320,0.176}
|
217
186
|
\definecolor{LightRose}{rgb}{1.000,0.600,0.800}
|
218
187
|
\definecolor{Cornsilk}{rgb}{1.000,0.972,0.864}
|
219
|
-
\definecolor{Navy}{rgb}{0.000,0.000,0.500}
|
220
188
|
\definecolor{Peru}{rgb}{0.804,0.520,0.248}
|
221
189
|
\definecolor{Indigo}{rgb}{0.294,0.000,0.510}
|
222
190
|
\definecolor{Aquamarine}{rgb}{0.498,1.000,0.830}
|
@@ -233,12 +201,12 @@ End_of_preamble
|
|
233
201
|
\definecolor{LightSkyBlue}{rgb}{0.530,0.808,0.980}
|
234
202
|
\definecolor{DarkCyan}{rgb}{0.000,0.545,0.545}
|
235
203
|
\definecolor{OrangeRed}{rgb}{1.000,0.270,0.000}
|
204
|
+
\definecolor{Purple}{rgb}{0.500,0.000,0.500}
|
236
205
|
\definecolor{LavenderBlush}{rgb}{1.000,0.940,0.960}
|
237
206
|
\definecolor{Black}{rgb}{0.000,0.000,0.000}
|
238
207
|
\definecolor{White}{rgb}{1.000,1.000,1.000}
|
239
208
|
\definecolor{MediumAquamarine}{rgb}{0.400,0.804,0.668}
|
240
209
|
\definecolor{DarkRoyalBlue}{rgb}{0.000,0.200,0.800}
|
241
|
-
\definecolor{Purple}{rgb}{0.500,0.000,0.500}
|
242
210
|
\definecolor{SalmonRed}{rgb}{1.000,0.400,0.400}
|
243
211
|
\definecolor{LightMustard}{rgb}{1.000,0.800,0.400}
|
244
212
|
\definecolor{Chiffon}{rgb}{0.980,0.980,0.824}
|
@@ -254,17 +222,17 @@ End_of_preamble
|
|
254
222
|
\definecolor{MediumPurple}{rgb}{0.576,0.440,0.860}
|
255
223
|
\definecolor{DarkSlateGrey}{rgb}{0.185,0.310,0.310}
|
256
224
|
\definecolor{RedOrange}{rgb}{0.800,0.200,0.000}
|
225
|
+
\definecolor{Silver}{rgb}{0.752,0.752,0.752}
|
257
226
|
\definecolor{LightSalmon}{rgb}{1.000,0.628,0.480}
|
258
227
|
\definecolor{Crimson}{rgb}{0.800,0.000,0.200}
|
259
228
|
\definecolor{OldLace}{rgb}{0.992,0.960,0.900}
|
260
229
|
\definecolor{GhostWhite}{rgb}{0.972,0.972,1.000}
|
261
|
-
\definecolor{
|
230
|
+
\definecolor{Avocado}{rgb}{0.600,0.600,0.000}
|
262
231
|
\definecolor{Turquoise}{rgb}{0.250,0.880,0.815}
|
263
232
|
\definecolor{Linen}{rgb}{0.980,0.940,0.900}
|
264
233
|
\definecolor{DarkOrchid}{rgb}{0.600,0.196,0.800}
|
265
234
|
\definecolor{Pink}{rgb}{1.000,0.752,0.796}
|
266
235
|
\definecolor{Ivory}{rgb}{1.000,1.000,0.940}
|
267
|
-
\definecolor{Avocado}{rgb}{0.600,0.600,0.000}
|
268
236
|
\definecolor{BurlyWood}{rgb}{0.870,0.720,0.530}
|
269
237
|
\definecolor{MediumVioletRed}{rgb}{0.780,0.084,0.520}
|
270
238
|
\definecolor{DeepSkyBlue}{rgb}{0.000,0.750,1.000}
|
@@ -275,48 +243,48 @@ End_of_preamble
|
|
275
243
|
\definecolor{Orchid}{rgb}{0.855,0.440,0.840}
|
276
244
|
\definecolor{Gray}{rgb}{0.500,0.500,0.500}
|
277
245
|
\definecolor{Smoke}{rgb}{0.950,0.950,0.950}
|
246
|
+
\definecolor{WhiteSmoke}{rgb}{0.970,0.970,0.970}
|
278
247
|
\definecolor{MediumBlue}{rgb}{0.000,0.000,0.804}
|
279
248
|
\definecolor{DarkSalmon}{rgb}{0.912,0.590,0.480}
|
280
249
|
\definecolor{PurpleBlue}{rgb}{0.400,0.200,0.800}
|
281
250
|
\definecolor{LawnGreen}{rgb}{0.488,0.990,0.000}
|
282
251
|
\definecolor{BlanchedAlmond}{rgb}{1.000,0.920,0.804}
|
283
|
-
\definecolor{WhiteSmoke}{rgb}{0.970,0.970,0.970}
|
284
252
|
\definecolor{Chocolate}{rgb}{0.824,0.410,0.116}
|
285
|
-
\definecolor{LightOliveGreen}{rgb}{0.600,0.800,0.600}
|
286
253
|
\definecolor{Moccasin}{rgb}{1.000,0.894,0.710}
|
287
254
|
\definecolor{FloralWhite}{rgb}{1.000,0.980,0.940}
|
288
255
|
\definecolor{SandyBrown}{rgb}{0.956,0.644,0.376}
|
289
|
-
\definecolor{
|
290
|
-
\definecolor{AliceBlue}{rgb}{0.940,0.972,1.000}
|
291
|
-
\definecolor{Honeydew}{rgb}{0.940,1.000,0.940}
|
256
|
+
\definecolor{LightOliveGreen}{rgb}{0.600,0.800,0.600}
|
292
257
|
\definecolor{DarkLavender}{rgb}{0.400,0.200,0.600}
|
293
258
|
\definecolor{PapayaWhip}{rgb}{1.000,0.936,0.835}
|
259
|
+
\definecolor{Honeydew}{rgb}{0.940,1.000,0.940}
|
260
|
+
\definecolor{AliceBlue}{rgb}{0.940,0.972,1.000}
|
294
261
|
\definecolor{Tan}{rgb}{0.824,0.705,0.550}
|
295
|
-
\definecolor{
|
296
|
-
\definecolor{LightCrimson}{rgb}{0.864,0.080,0.235}
|
297
|
-
\definecolor{DarkSmoke}{rgb}{0.920,0.920,0.920}
|
262
|
+
\definecolor{LightYellowGreen}{rgb}{0.800,0.800,0.200}
|
298
263
|
\definecolor{MediumSeaGreen}{rgb}{0.235,0.700,0.444}
|
264
|
+
\definecolor{DarkSmoke}{rgb}{0.920,0.920,0.920}
|
299
265
|
\definecolor{Rose}{rgb}{1.000,0.400,0.600}
|
300
|
-
\definecolor{
|
301
|
-
\definecolor{
|
302
|
-
\definecolor{Gold}{rgb}{1.000,0.844,0.000}
|
266
|
+
\definecolor{LightCrimson}{rgb}{0.864,0.080,0.235}
|
267
|
+
\definecolor{BrightBlue}{rgb}{0.000,0.400,1.000}
|
303
268
|
\definecolor{Olive}{rgb}{0.500,0.500,0.000}
|
269
|
+
\definecolor{Gold}{rgb}{1.000,0.844,0.000}
|
304
270
|
\definecolor{SkyBlue}{rgb}{0.530,0.808,0.920}
|
271
|
+
\definecolor{LightSandyBrown}{rgb}{1.000,0.800,0.600}
|
272
|
+
\definecolor{Cyan}{rgb}{0.000,1.000,1.000}
|
305
273
|
\definecolor{DarkPeriwinkle}{rgb}{0.400,0.400,1.000}
|
306
|
-
\definecolor{Azure}{rgb}{0.940,1.000,1.000}
|
307
|
-
\definecolor{Khaki}{rgb}{0.940,0.900,0.550}
|
308
|
-
\definecolor{Magenta}{rgb}{1.000,0.000,1.000}
|
309
274
|
\definecolor{Plum}{rgb}{0.868,0.628,0.868}
|
275
|
+
\definecolor{Khaki}{rgb}{0.940,0.900,0.550}
|
276
|
+
\definecolor{Azure}{rgb}{0.940,1.000,1.000}
|
310
277
|
\definecolor{Violet}{rgb}{0.932,0.510,0.932}
|
311
|
-
\definecolor{
|
312
|
-
\definecolor{LightGray}{rgb}{0.828,0.828,0.828}
|
278
|
+
\definecolor{Magenta}{rgb}{1.000,0.000,1.000}
|
313
279
|
\definecolor{DimGray}{rgb}{0.410,0.410,0.410}
|
314
|
-
\definecolor{YellowGreen}{rgb}{0.800,0.800,0.000}
|
315
280
|
\definecolor{LightChartreuse}{rgb}{0.800,1.000,0.400}
|
281
|
+
\definecolor{LightGray}{rgb}{0.828,0.828,0.828}
|
282
|
+
\definecolor{CadetBlue}{rgb}{0.372,0.620,0.628}
|
283
|
+
\definecolor{YellowGreen}{rgb}{0.800,0.800,0.000}
|
316
284
|
\definecolor{DarkGray}{rgb}{0.664,0.664,0.664}
|
317
285
|
\definecolor{LightSlateGrey}{rgb}{0.468,0.532,0.600}
|
318
|
-
\definecolor{GrayBlue}{rgb}{0.000,0.400,0.600}
|
319
286
|
\definecolor{PaleGoldenrod}{rgb}{0.932,0.910,0.668}
|
287
|
+
\definecolor{GrayBlue}{rgb}{0.000,0.400,0.600}
|
320
288
|
\definecolor{Snow}{rgb}{1.000,0.980,0.980}
|
321
289
|
\definecolor{DarkSeaGreen}{rgb}{0.560,0.736,0.560}
|
322
290
|
\definecolor{Blue}{rgb}{0.000,0.000,1.000}
|
@@ -324,9 +292,9 @@ End_of_preamble
|
|
324
292
|
\definecolor{MediumGreen}{rgb}{0.000,0.600,0.000}
|
325
293
|
\definecolor{PurpleGray}{rgb}{0.600,0.600,0.800}
|
326
294
|
\definecolor{Yellow}{rgb}{1.000,1.000,0.000}
|
327
|
-
\definecolor{ForestGreen}{rgb}{0.132,0.545,0.132}
|
328
295
|
\definecolor{Coral}{rgb}{1.000,0.498,0.312}
|
329
296
|
\definecolor{LightOrchid}{rgb}{0.600,0.400,0.800}
|
297
|
+
\definecolor{ForestGreen}{rgb}{0.132,0.545,0.132}
|
330
298
|
\definecolor{MustardSeed}{rgb}{0.800,0.600,0.000}
|
331
299
|
\definecolor{SeaGreen}{rgb}{0.180,0.545,0.340}
|
332
300
|
\definecolor{DarkMagenta}{rgb}{0.545,0.000,0.545}
|
@@ -345,9 +313,9 @@ End_of_preamble
|
|
345
313
|
\definecolor{LightSeaGreen}{rgb}{0.125,0.698,0.668}
|
346
314
|
\definecolor{OliveDrab}{rgb}{0.420,0.556,0.136}
|
347
315
|
\definecolor{SlateBlue}{rgb}{0.415,0.352,0.804}
|
348
|
-
\definecolor{Lavender}{rgb}{0.900,0.900,0.980}
|
349
316
|
\definecolor{DarkPurpleBlue}{rgb}{0.400,0.000,0.800}
|
350
317
|
\definecolor{Beige}{rgb}{0.960,0.960,0.864}
|
318
|
+
\definecolor{Lavender}{rgb}{0.900,0.900,0.980}
|
351
319
|
\definecolor{Maroon}{rgb}{0.500,0.000,0.000}
|
352
320
|
\definecolor{PowderBlue}{rgb}{0.690,0.880,0.900}
|
353
321
|
\definecolor{WarmGray}{rgb}{0.678,0.660,0.562}
|
@@ -366,6 +334,38 @@ End_of_preamble
|
|
366
334
|
\definecolor{BlueGreen}{rgb}{0.000,0.600,0.400}
|
367
335
|
\definecolor{MediumOrange}{rgb}{1.000,0.400,0.000}
|
368
336
|
\definecolor{Red}{rgb}{1.000,0.000,0.000}
|
337
|
+
\definecolor{Fuchsia}{rgb}{1.000,0.000,1.000}
|
338
|
+
\definecolor{CornflowerBlue}{rgb}{0.392,0.585,0.930}
|
339
|
+
\definecolor{LightPlum}{rgb}{0.800,0.600,0.800}
|
340
|
+
\definecolor{NavajoWhite}{rgb}{1.000,0.870,0.680}
|
341
|
+
\definecolor{Seashell}{rgb}{1.000,0.960,0.932}
|
342
|
+
\definecolor{Aqua}{rgb}{0.000,1.000,1.000}
|
343
|
+
\definecolor{IndianRed}{rgb}{0.804,0.360,0.360}
|
344
|
+
\definecolor{DarkOliveGreen}{rgb}{0.332,0.420,0.185}
|
345
|
+
\definecolor{Lime}{rgb}{0.000,1.000,0.000}
|
346
|
+
\definecolor{Periwinkle}{rgb}{0.600,0.000,1.000}
|
347
|
+
\definecolor{Thistle}{rgb}{0.848,0.750,0.848}
|
348
|
+
\definecolor{Brown}{rgb}{0.648,0.165,0.165}
|
349
|
+
\definecolor{LightDullGreen}{rgb}{0.400,1.000,0.600}
|
350
|
+
\definecolor{DarkViolet}{rgb}{0.580,0.000,0.828}
|
351
|
+
\definecolor{MediumSpringGreen}{rgb}{0.000,0.980,0.604}
|
352
|
+
\definecolor{RoyalBlue}{rgb}{0.255,0.410,0.884}
|
353
|
+
\definecolor{LightSienna}{rgb}{0.800,0.400,0.000}
|
354
|
+
\definecolor{Goldenrod}{rgb}{0.855,0.648,0.125}
|
355
|
+
\definecolor{DarkChocolate}{rgb}{0.400,0.200,0.000}
|
356
|
+
\definecolor{Orange}{rgb}{1.000,0.648,0.000}
|
357
|
+
\definecolor{SlateGray}{rgb}{0.440,0.500,0.565}
|
358
|
+
\definecolor{Bisque}{rgb}{1.000,0.894,0.770}
|
359
|
+
\definecolor{LavenderBlue}{rgb}{0.400,0.200,1.000}
|
360
|
+
\definecolor{DarkRed}{rgb}{0.545,0.000,0.000}
|
361
|
+
\definecolor{Mauve}{rgb}{0.800,0.200,0.400}
|
362
|
+
\definecolor{Pumpkin}{rgb}{1.000,0.600,0.200}
|
363
|
+
\definecolor{Wheat}{rgb}{0.960,0.870,0.700}
|
364
|
+
\definecolor{Chartreuse}{rgb}{0.498,1.000,0.000}
|
365
|
+
\definecolor{LightGrey}{rgb}{0.828,0.828,0.828}
|
366
|
+
\definecolor{DodgerBlue}{rgb}{0.116,0.565,1.000}
|
367
|
+
\definecolor{MintCream}{rgb}{0.960,1.000,0.980}
|
368
|
+
\definecolor{Salmon}{rgb}{0.980,0.500,0.448}
|
369
369
|
|
370
370
|
End_of_preamble
|
371
371
|
end
|
data/split/Tioga/lib/Utils.rb
CHANGED
@@ -43,6 +43,13 @@ module Tioga
|
|
43
43
|
end
|
44
44
|
return a
|
45
45
|
end
|
46
|
+
module_function :tex_quote_text
|
47
|
+
|
48
|
+
class ::String
|
49
|
+
def quotex
|
50
|
+
Tioga::Utils.tex_quote_text(self)
|
51
|
+
end
|
52
|
+
end
|
46
53
|
|
47
54
|
# Dimension conversion constants taken straight from the TeXbook
|
48
55
|
DIMENSION_CONVERSION = {
|
data/split/Tioga/lib/maker.rb
CHANGED
@@ -326,10 +326,11 @@ class TiogaUI
|
|
326
326
|
$figures_font = 'system 12'
|
327
327
|
=end
|
328
328
|
|
329
|
-
|
330
|
-
|
331
|
-
load(tiogainit_name)
|
329
|
+
tiogainit_names = %w[ .tiogarc .tiogainit ].map do |f|
|
330
|
+
File.join(ENV['HOME'], f)
|
332
331
|
end
|
332
|
+
tiogainit_name = tiogainit_names.find {|f| test ?e, f}
|
333
|
+
load(tiogainit_name) unless tiogainit_name.nil?
|
333
334
|
|
334
335
|
@pdf_name = nil
|
335
336
|
@have_loaded = false
|
@@ -443,8 +444,8 @@ class TiogaUI
|
|
443
444
|
return
|
444
445
|
end
|
445
446
|
make_portfolio(true, parse_figs($tioga_args[argnum]))
|
446
|
-
else # unrecognized command
|
447
|
-
|
447
|
+
#else # unrecognized command
|
448
|
+
# show_help(filename,cmd)
|
448
449
|
end
|
449
450
|
rescue
|
450
451
|
end
|
data/split/Tioga/namespace.h
CHANGED
@@ -21,27 +21,35 @@
|
|
21
21
|
#ifndef _NAMESPACE_H
|
22
22
|
#define _NAMESPACE_H
|
23
23
|
|
24
|
-
/* This header file provides
|
25
|
-
extern symbols:
|
24
|
+
/* This header file provides three OS-specific macros for the definition of
|
25
|
+
extern (or NOT extern) symbols:
|
26
26
|
|
27
27
|
* PUBLIC, which has to be used to mark objects that will be used
|
28
|
-
|
28
|
+
outside the module
|
29
29
|
|
30
|
-
*
|
30
|
+
* INTERN, for symbols which are shared among compilation units within a
|
31
|
+
module, but are NOT exported to other modules.
|
32
|
+
|
33
|
+
* PRIVATE, for symbols which are visible only within the containing
|
34
|
+
compilation unit (i.e. C source file) and, of course, are not exported to
|
35
|
+
other modules.
|
31
36
|
|
32
37
|
Please don't add "extern" after the PRIVATE or PUBLIC declaration
|
33
38
|
as this would break compilation on Darwin.
|
34
39
|
*/
|
35
40
|
|
36
|
-
#
|
41
|
+
#if __GNUC__ >= 4 /* we have the visibility attribute */
|
42
|
+
# define INTERN __attribute__ ((visibility ("hidden")))
|
43
|
+
# define PUBLIC __attribute__ ((visibility ("default")))
|
44
|
+
# define INTERN_EXTERN extern
|
45
|
+
#elif defined __APPLE__
|
37
46
|
# define INTERN __private_extern__
|
38
47
|
# define PUBLIC
|
39
|
-
#
|
40
|
-
# define INTERN __attribute__ ((visibility ("hidden")))
|
41
|
-
# define PUBLIC __attribute__ ((visibility ("default")))
|
48
|
+
# define INTERN_EXTERN
|
42
49
|
#else /* not really good */
|
43
50
|
# define INTERN
|
44
51
|
# define PUBLIC
|
52
|
+
# define INTERN_EXTERN
|
45
53
|
#endif /* __APPLE__ and __GNU_C_ >= 4*/
|
46
54
|
|
47
55
|
/* In any case, PRIVATE is static */
|
data/split/Tioga/pdfcolor.c
CHANGED
@@ -362,7 +362,8 @@ clr_value(double n1, double n2, double hue) // from plplot plctrl.c
|
|
362
362
|
}
|
363
363
|
|
364
364
|
|
365
|
-
|
365
|
+
// this is also used for converting images
|
366
|
+
void
|
366
367
|
convert_hls_to_rgb(double h, double l, double s, double *p_r, double *p_g,
|
367
368
|
double *p_b) // from plplot plctrl.c
|
368
369
|
{
|
@@ -510,16 +511,31 @@ c_get_color_from_colormap(OBJ_PTR fmkr, FM *p, OBJ_PTR color_map, double x,
|
|
510
511
|
int *ierr)
|
511
512
|
{ // x is from 0 to 1. this returns a vector for the RGB color from
|
512
513
|
// the given colormap
|
513
|
-
|
514
|
-
|
515
|
-
|
514
|
+
OBJ_PTR cm_len_obj;
|
515
|
+
OBJ_PTR lookup_obj;
|
516
|
+
unsigned char *buff;
|
517
|
+
unsigned char r, g, b;
|
518
|
+
int i, cm_len, lu_len;
|
519
|
+
|
520
|
+
cm_len_obj = Array_Entry(color_map, 0, ierr);
|
521
|
+
if (*ierr != 0) RETURN_NIL;
|
522
|
+
cm_len = Number_to_int(cm_len_obj, ierr) + 1;
|
523
|
+
if (*ierr != 0) RETURN_NIL;
|
524
|
+
lookup_obj = Array_Entry(color_map, 1, ierr);
|
525
|
+
if (*ierr != 0) RETURN_NIL;
|
526
|
+
buff = (unsigned char *)(String_Ptr(lookup_obj,ierr));
|
516
527
|
if (*ierr != 0) RETURN_NIL;
|
517
|
-
|
518
|
-
|
528
|
+
lu_len = String_Len(lookup_obj,ierr);
|
529
|
+
if (*ierr != 0) RETURN_NIL;
|
530
|
+
|
531
|
+
if (3*cm_len != lu_len) {
|
532
|
+
RAISE_ERROR("Sorry: lookup length must be 3 times colormap length "
|
519
533
|
"(for R G B components)", ierr);
|
520
534
|
RETURN_NIL;
|
521
535
|
}
|
522
|
-
|
536
|
+
// Make sure x is non-negative
|
537
|
+
if (x < 0.0) x = -x;
|
538
|
+
i = 3 * (ROUND(x * (cm_len-1)) % cm_len);
|
523
539
|
r = buff[i]; g = buff[i+1]; b = buff[i+2];
|
524
540
|
OBJ_PTR result = Array_New(3);
|
525
541
|
Array_Store(result, 0, Float_New(r/255.0), ierr);
|
@@ -785,3 +801,43 @@ c_yaxis_stroke_color_get(OBJ_PTR fmkr, FM *p, int *ierr)
|
|
785
801
|
Array_Store(result, 2, Float_New(b), ierr);
|
786
802
|
return result;
|
787
803
|
}
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
void
|
808
|
+
str_hls_to_rgb_bang(unsigned char* str, long len)
|
809
|
+
{
|
810
|
+
double r,g,b,h,l,s;
|
811
|
+
long n, j;
|
812
|
+
// convert HLS triples to RGB triples
|
813
|
+
n = len/3;
|
814
|
+
for (j=0; j<n; j++) {
|
815
|
+
// 360/256 = 1.40625
|
816
|
+
h = str[0]*1.40625; l = str[1]/255.0; s = str[2]/255.0;
|
817
|
+
convert_hls_to_rgb(h,l,s,&r,&g,&b);
|
818
|
+
*str++ = round(r*255.0); *str++ = round(g*255.0); *str++ = round(b*255.0);
|
819
|
+
}
|
820
|
+
}
|
821
|
+
|
822
|
+
|
823
|
+
void
|
824
|
+
c_string_hls_to_rgb_bang(OBJ_PTR fmkr, FM *p, unsigned char* str, long len, int *ierr)
|
825
|
+
{ str_hls_to_rgb_bang(str,len); }
|
826
|
+
|
827
|
+
void
|
828
|
+
c_string_rgb_to_hls_bang(OBJ_PTR fmkr, FM *p, unsigned char* str, long len, int *ierr)
|
829
|
+
{
|
830
|
+
double r,g,b,h,l,s;
|
831
|
+
long n, j;
|
832
|
+
// convert RGB triples to HLS triples
|
833
|
+
n = len/3;
|
834
|
+
for (j=0; j<n; j++) {
|
835
|
+
// 360/256 = 1.40625
|
836
|
+
r = str[0]/255.0; g = str[1]/255.0; b = str[2]/255.0;
|
837
|
+
convert_rgb_to_hls(r, g, b, &h, &l, &s);
|
838
|
+
*str++ = round(h/1.40625); *str++ = round(l*255.0); *str++ = round(s*255.0);
|
839
|
+
}
|
840
|
+
}
|
841
|
+
|
842
|
+
|
843
|
+
|