mathematical 1.4.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +11 -21
  3. data/ext/mathematical/extconf.rb +21 -12
  4. data/ext/mathematical/lasem/Makefile +10 -10
  5. data/ext/mathematical/lasem/docs/Makefile +9 -9
  6. data/ext/mathematical/lasem/docs/reference/Makefile +9 -9
  7. data/ext/mathematical/lasem/docs/reference/lasem/Makefile +15 -9
  8. data/ext/mathematical/lasem/docs/reference/lasem/lasem-decl-list.txt +245 -0
  9. data/ext/mathematical/lasem/docs/reference/lasem/lasem-decl.txt +856 -0
  10. data/ext/mathematical/lasem/docs/reference/lasem/lasem-overrides.txt +0 -0
  11. data/ext/mathematical/lasem/itex2mml/Makefile +9 -9
  12. data/ext/mathematical/lasem/src/Makefile +34 -13
  13. data/ext/mathematical/lasem/src/lasemrender.c +13 -7
  14. data/ext/mathematical/lasem/src/lsmdomenumtypes.c +99 -0
  15. data/ext/mathematical/lasem/src/lsmdomenumtypes.h +26 -0
  16. data/ext/mathematical/lasem/src/lsmmathmlenums.c +24 -0
  17. data/ext/mathematical/lasem/src/lsmmathmlenums.h +12 -1
  18. data/ext/mathematical/lasem/src/lsmmathmlenumtypes.c +793 -0
  19. data/ext/mathematical/lasem/src/lsmmathmlenumtypes.h +96 -0
  20. data/ext/mathematical/lasem/src/lsmmathmlspaceelement.c +14 -0
  21. data/ext/mathematical/lasem/src/lsmmathmlspaceelement.h +1 -1
  22. data/ext/mathematical/lasem/src/lsmmathmltraits.c +24 -0
  23. data/ext/mathematical/lasem/src/lsmmathmltraits.h +1 -0
  24. data/ext/mathematical/lasem/src/lsmsvgattributes.h +50 -0
  25. data/ext/mathematical/lasem/src/lsmsvgdocument.c +18 -0
  26. data/ext/mathematical/lasem/src/lsmsvgenums.c +130 -0
  27. data/ext/mathematical/lasem/src/lsmsvgenums.h +59 -0
  28. data/ext/mathematical/lasem/src/lsmsvgenumtypes.c +1254 -0
  29. data/ext/mathematical/lasem/src/lsmsvgenumtypes.h +129 -0
  30. data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.c +115 -0
  31. data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.h +58 -0
  32. data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.c +206 -0
  33. data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.h +64 -0
  34. data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.c +124 -0
  35. data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.h +60 -0
  36. data/ext/mathematical/lasem/src/lsmsvgfilterimage.c +167 -0
  37. data/ext/mathematical/lasem/src/lsmsvgfilterimage.h +61 -0
  38. data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.c +116 -0
  39. data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.h +58 -0
  40. data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.c +9 -2
  41. data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +1169 -87
  42. data/ext/mathematical/lasem/src/lsmsvgfiltersurface.h +28 -2
  43. data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.c +142 -0
  44. data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.h +61 -0
  45. data/ext/mathematical/lasem/src/lsmsvgtraits.c +249 -0
  46. data/ext/mathematical/lasem/src/lsmsvgtraits.h +18 -0
  47. data/ext/mathematical/lasem/src/lsmsvgtypes.h +6 -0
  48. data/ext/mathematical/lasem/src/lsmsvgview.c +267 -66
  49. data/ext/mathematical/lasem/src/lsmsvgview.h +23 -0
  50. data/ext/mathematical/lasem/src/lsmtraits.c +53 -1
  51. data/ext/mathematical/lasem/src/lsmtraits.h +2 -0
  52. data/ext/mathematical/lasem/tests/Makefile +26 -15
  53. data/ext/mathematical/lasem/tests/filter.c +152 -0
  54. data/ext/mathematical/lasem/tests/lsmtest.c +34 -30
  55. data/ext/mathematical/lasem/tests/suite.c +5 -2
  56. data/ext/mathematical/lib/libmtex2MML.a +0 -0
  57. data/ext/mathematical/mtex2MML/build/CMakeCache.txt +425 -0
  58. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCCompiler.cmake +55 -0
  59. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCXXCompiler.cmake +56 -0
  60. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeSystem.cmake +15 -0
  61. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c +393 -0
  62. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  63. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +34 -0
  64. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/DependInfo.cmake +27 -0
  65. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/cmake_clean.cmake +8 -0
  66. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/DependInfo.cmake +27 -0
  67. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/cmake_clean.cmake +8 -0
  68. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/DependInfo.cmake +27 -0
  69. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/cmake_clean.cmake +8 -0
  70. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/DependInfo.cmake +27 -0
  71. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/cmake_clean.cmake +8 -0
  72. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/DependInfo.cmake +27 -0
  73. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/cmake_clean.cmake +8 -0
  74. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/DependInfo.cmake +27 -0
  75. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/cmake_clean.cmake +8 -0
  76. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/DependInfo.cmake +27 -0
  77. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/cmake_clean.cmake +8 -0
  78. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/DependInfo.cmake +27 -0
  79. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/cmake_clean.cmake +8 -0
  80. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/DependInfo.cmake +27 -0
  81. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/cmake_clean.cmake +8 -0
  82. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/DependInfo.cmake +27 -0
  83. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/cmake_clean.cmake +8 -0
  84. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/DependInfo.cmake +27 -0
  85. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/cmake_clean.cmake +8 -0
  86. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/DependInfo.cmake +27 -0
  87. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/cmake_clean.cmake +8 -0
  88. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/DependInfo.cmake +27 -0
  89. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/cmake_clean.cmake +8 -0
  90. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/DependInfo.cmake +27 -0
  91. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/cmake_clean.cmake +8 -0
  92. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/DependInfo.cmake +27 -0
  93. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/cmake_clean.cmake +8 -0
  94. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/DependInfo.cmake +27 -0
  95. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/cmake_clean.cmake +8 -0
  96. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/DependInfo.cmake +27 -0
  97. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/cmake_clean.cmake +8 -0
  98. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/DependInfo.cmake +27 -0
  99. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/cmake_clean.cmake +8 -0
  100. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +95 -0
  101. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/DependInfo.cmake +27 -0
  102. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/cmake_clean.cmake +8 -0
  103. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/DependInfo.cmake +27 -0
  104. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/cmake_clean.cmake +8 -0
  105. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/DependInfo.cmake +27 -0
  106. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/cmake_clean.cmake +8 -0
  107. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/DependInfo.cmake +27 -0
  108. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/cmake_clean.cmake +8 -0
  109. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/DependInfo.cmake +27 -0
  110. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/cmake_clean.cmake +8 -0
  111. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/DependInfo.cmake +27 -0
  112. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/cmake_clean.cmake +8 -0
  113. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/DependInfo.cmake +27 -0
  114. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/cmake_clean.cmake +8 -0
  115. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/DependInfo.cmake +27 -0
  116. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/cmake_clean.cmake +8 -0
  117. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/DependInfo.cmake +27 -0
  118. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/cmake_clean.cmake +8 -0
  119. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/DependInfo.cmake +27 -0
  120. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/cmake_clean.cmake +8 -0
  121. data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +34 -0
  122. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/DependInfo.cmake +27 -0
  123. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/cmake_clean.cmake +8 -0
  124. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +44 -0
  125. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +19 -0
  126. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +1 -0
  127. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +43 -0
  128. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +18 -0
  129. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean_target.cmake +3 -0
  130. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +2 -0
  131. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/DependInfo.cmake +27 -0
  132. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/cmake_clean.cmake +8 -0
  133. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +44 -0
  134. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +19 -0
  135. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +1 -0
  136. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +59 -0
  137. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +35 -0
  138. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +1 -0
  139. data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +7 -0
  140. data/ext/mathematical/mtex2MML/build/Makefile +1332 -0
  141. data/ext/mathematical/mtex2MML/build/cmake_install.cmake +43 -0
  142. data/ext/mathematical/mtex2MML/build/lexer.c +8877 -0
  143. data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
  144. data/ext/mathematical/mtex2MML/build/mtex2mml_export.h +35 -0
  145. data/ext/mathematical/mtex2MML/build/parser.c +10202 -0
  146. data/ext/mathematical/mtex2MML/build/parser.h +619 -0
  147. data/ext/mathematical/mtex2MML/src/mtex2MML.h +1 -1
  148. data/lib/mathematical/version.rb +1 -1
  149. metadata +115 -2
@@ -0,0 +1,152 @@
1
+ #include <glib.h>
2
+ #include <lsmsvgfiltersurface.h>
3
+
4
+ static void
5
+ surface (void)
6
+ {
7
+ LsmSvgFilterSurface *surface;
8
+ const LsmBox *subregion;
9
+
10
+ surface = lsm_svg_filter_surface_new ("test", 320, 200, NULL);
11
+
12
+ g_assert (surface != NULL);
13
+ g_assert_cmpstr (lsm_svg_filter_surface_get_name (surface), ==, "test");
14
+
15
+ subregion = lsm_svg_filter_surface_get_subregion (surface);
16
+
17
+ g_assert (subregion != NULL);
18
+
19
+ lsm_svg_filter_surface_ref (surface);
20
+ lsm_svg_filter_surface_unref (surface);
21
+
22
+ lsm_svg_filter_surface_unref (surface);
23
+
24
+ g_test_expect_message ("Lasem", G_LOG_LEVEL_CRITICAL, "*assertion*ref_count*failed");
25
+
26
+ lsm_svg_filter_surface_unref (surface);
27
+
28
+ g_test_assert_expected_messages ();
29
+ }
30
+
31
+ static void
32
+ similar (void)
33
+ {
34
+ LsmSvgFilterSurface *surface_a;
35
+ LsmSvgFilterSurface *surface_b;
36
+
37
+ surface_a = lsm_svg_filter_surface_new ("test_a", 320, 200, NULL);
38
+ surface_b = lsm_svg_filter_surface_new_similar ("test_b", surface_a, NULL);
39
+
40
+ g_assert_cmpstr (lsm_svg_filter_surface_get_name (surface_a), ==, "test_a");
41
+ g_assert_cmpstr (lsm_svg_filter_surface_get_name (surface_b), ==, "test_b");
42
+
43
+ lsm_svg_filter_surface_unref (surface_a);
44
+ lsm_svg_filter_surface_unref (surface_b);
45
+ }
46
+
47
+ static void
48
+ operations (LsmSvgFilterSurface *input_1, LsmSvgFilterSurface *input_2, LsmSvgFilterSurface *output)
49
+ {
50
+ cairo_matrix_t transform;
51
+
52
+ cairo_matrix_init_identity (&transform);
53
+
54
+ lsm_svg_filter_surface_alpha (input_1, output);
55
+ lsm_svg_filter_surface_blend (input_1, input_2, output, LSM_SVG_BLENDING_MODE_XOR);
56
+ lsm_svg_filter_surface_blur (input_1, output, 0.0, 0.0);
57
+ lsm_svg_filter_surface_blur (input_1, output, 1.0, 1.0);
58
+ lsm_svg_filter_surface_blur (input_1, output, 10.0, 10.0);
59
+ lsm_svg_filter_surface_blur (input_1, output, 1000.0, 1000.0);
60
+ lsm_svg_filter_surface_color_matrix (input_1, output, LSM_SVG_COLOR_FILTER_TYPE_HUE_ROTATE, 0, NULL);
61
+ lsm_svg_filter_surface_convolve_matrix (input_1, output, 0, 0, 0, NULL, 1.0, 0.0, 0, 0, LSM_SVG_EDGE_MODE_NONE, TRUE);
62
+ lsm_svg_filter_surface_displacement_map (input_1, input_2, output, 2.0, 2.0,
63
+ LSM_SVG_CHANNEL_SELECTOR_RED, LSM_SVG_CHANNEL_SELECTOR_GREEN);
64
+ lsm_svg_filter_surface_displacement_map (input_1, input_2, output, 2.0, 3.0,
65
+ LSM_SVG_CHANNEL_SELECTOR_BLUE, LSM_SVG_CHANNEL_SELECTOR_ALPHA);
66
+ lsm_svg_filter_surface_displacement_map (input_1, input_2, output, 0.0, 0.0,
67
+ LSM_SVG_CHANNEL_SELECTOR_ALPHA, LSM_SVG_CHANNEL_SELECTOR_ALPHA);
68
+ lsm_svg_filter_surface_flood (output, 1.0, 0.0, 0.5, 0.25);
69
+ lsm_svg_filter_surface_merge (input_1, output);
70
+ lsm_svg_filter_surface_morphology (input_1, output, LSM_SVG_MORPHOLOGY_OPERATOR_ERODE, 1, 1);
71
+ lsm_svg_filter_surface_morphology (input_1, output, LSM_SVG_MORPHOLOGY_OPERATOR_DILATE, 1, 1);
72
+ lsm_svg_filter_surface_offset (input_1, output, 10, 10);
73
+ lsm_svg_filter_surface_offset (input_1, output, -10, -10);
74
+ lsm_svg_filter_surface_offset (input_1, output, -1000, -1000);
75
+ lsm_svg_filter_surface_tile (input_1, output);
76
+ lsm_svg_filter_surface_turbulence (output, 10.0, 10.0, 2, 1.0, LSM_SVG_STITCH_TILES_STITCH, LSM_SVG_TURBULENCE_TYPE_FRACTAL_NOISE,
77
+ &transform);
78
+ }
79
+
80
+ static void
81
+ processing (void)
82
+ {
83
+ LsmSvgFilterSurface *input_1;
84
+ LsmSvgFilterSurface *input_2;
85
+ LsmSvgFilterSurface *output;
86
+
87
+ input_1 = lsm_svg_filter_surface_new ("input_1", 320, 200, NULL);
88
+ input_2 = lsm_svg_filter_surface_new_similar ("input_2", input_1, NULL);
89
+ output = lsm_svg_filter_surface_new_similar ("output", input_1, NULL);
90
+
91
+ operations (input_1, input_2, output);
92
+
93
+ lsm_svg_filter_surface_unref (input_1);
94
+ lsm_svg_filter_surface_unref (input_2);
95
+ lsm_svg_filter_surface_unref (output);
96
+ }
97
+
98
+ static void
99
+ processing_mismatch (void)
100
+ {
101
+ LsmSvgFilterSurface *input_1;
102
+ LsmSvgFilterSurface *input_2;
103
+ LsmSvgFilterSurface *output;
104
+
105
+ input_1 = lsm_svg_filter_surface_new ("input_1", 320, 200, NULL);
106
+ input_2 = lsm_svg_filter_surface_new ("input_2", 100, 10, NULL);
107
+ output = lsm_svg_filter_surface_new ("output", 10, 5, NULL);
108
+
109
+ operations (input_1, input_2, output);
110
+
111
+ lsm_svg_filter_surface_unref (input_1);
112
+ lsm_svg_filter_surface_unref (input_2);
113
+ lsm_svg_filter_surface_unref (output);
114
+ }
115
+
116
+ static void
117
+ processing_null (void)
118
+ {
119
+ unsigned int i;
120
+
121
+ for (i = 0; i < 20; i++)
122
+ g_test_expect_message ("Lasem", G_LOG_LEVEL_CRITICAL, "*assertion*NULL*failed");
123
+
124
+ operations (NULL, NULL, NULL);
125
+
126
+ for (i = 0; i < 20; i++)
127
+ g_test_assert_expected_messages ();
128
+ }
129
+
130
+ int
131
+ main (int argc, char *argv[])
132
+ {
133
+ int result;
134
+
135
+ g_test_init (&argc, &argv, NULL);
136
+
137
+ g_test_add_func ("/filter/surface", surface);
138
+ g_test_add_func ("/filter/similar", similar);
139
+ g_test_add_func ("/filter/processing", processing);
140
+ g_test_add_func ("/filter/processing_mismatch", processing_mismatch);
141
+ g_test_add_func ("/filter/processing_null", processing_null);
142
+
143
+ #if !GLIB_CHECK_VERSION(2,36,0)
144
+ g_type_init ();
145
+ #endif
146
+
147
+ result = g_test_run ();
148
+
149
+ lsm_shutdown ();
150
+
151
+ return result;
152
+ }
@@ -61,7 +61,7 @@ static gboolean option_debug_mask = FALSE;
61
61
  static gboolean option_debug_group = FALSE;
62
62
  static gboolean option_debug_text = FALSE;
63
63
  static gboolean option_dry_run = FALSE;
64
- static double option_compare_fuzz = 15.0;
64
+ static double option_compare_fuzz = 10.0;
65
65
 
66
66
  static const GOptionEntry entries[] =
67
67
  {
@@ -246,7 +246,7 @@ compare_surfaces (const char *test_name, cairo_surface_t *surface_a, cairo_surfa
246
246
  }
247
247
 
248
248
  static void
249
- lasem_test_render (char const *filename, gboolean compare, gboolean dry_run, Statistic *statistic)
249
+ lasem_test_render (char const *filename, gboolean compare, gboolean dry_run, gboolean save_png, Statistic *statistic)
250
250
  {
251
251
  LsmDomDocument *document;
252
252
  LsmDomView *view;
@@ -341,7 +341,7 @@ lasem_test_render (char const *filename, gboolean compare, gboolean dry_run, Sta
341
341
  statistic->rendered_count++;
342
342
  g_timer_destroy (timer);
343
343
 
344
- if (!dry_run)
344
+ if (!dry_run && save_png)
345
345
  cairo_surface_write_to_png (surface, png_filename);
346
346
 
347
347
  if (check) {
@@ -368,39 +368,41 @@ lasem_test_render (char const *filename, gboolean compare, gboolean dry_run, Sta
368
368
  g_object_unref (view);
369
369
  g_object_unref (document);
370
370
 
371
- lasem_test_html ("<table border=\"1\" cellpadding=\"8\">\n");
372
- lasem_test_html ("<tr>");
371
+ if (save_png) {
372
+ lasem_test_html ("<table border=\"1\" cellpadding=\"8\">\n");
373
+ lasem_test_html ("<tr>");
373
374
 
374
- lasem_test_html ("<td><a href=\"%s\"><img border=\"0\" src=\"%s\"/></a></td>",
375
- filename, png_filename);
376
- lasem_test_html ("<td><img src=\"%s\"/></td>", reference_png_filename);
375
+ lasem_test_html ("<td><a href=\"%s\"><img border=\"0\" src=\"%s\"/></a></td>",
376
+ filename, png_filename);
377
+ lasem_test_html ("<td><img src=\"%s\"/></td>", reference_png_filename);
377
378
 
378
- lasem_test_html ("<td>");
379
+ lasem_test_html ("<td>");
379
380
 
380
- if (is_mathml) {
381
- regex = g_regex_new ("<math>", 0, 0, &error);
382
- assert (error == NULL);
381
+ if (is_mathml) {
382
+ regex = g_regex_new ("<math>", 0, 0, &error);
383
+ assert (error == NULL);
383
384
 
384
- filtered_buffer = g_regex_replace (regex, xml,
385
- -1, 0,
386
- "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">",
387
- 0, NULL);
388
- g_regex_unref (regex);
385
+ filtered_buffer = g_regex_replace (regex, xml,
386
+ -1, 0,
387
+ "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">",
388
+ 0, NULL);
389
+ g_regex_unref (regex);
389
390
 
390
- lasem_test_html ("%s", filtered_buffer);
391
+ lasem_test_html ("%s", filtered_buffer);
391
392
 
392
- g_free (filtered_buffer);
393
- }
393
+ g_free (filtered_buffer);
394
+ }
394
395
 
395
- if (is_svg) {
396
- lasem_test_html ("<object type=\"image/svg+xml\" data=\"");
397
- lasem_test_html ("%s", filename);
398
- lasem_test_html ("\" width=\"%dpx\"/>", width + 2);
399
- }
396
+ if (is_svg) {
397
+ lasem_test_html ("<object type=\"image/svg+xml\" data=\"");
398
+ lasem_test_html ("%s", filename);
399
+ lasem_test_html ("\" width=\"%dpx\"/>", width + 2);
400
+ }
400
401
 
401
- lasem_test_html ("</td>");
402
- lasem_test_html ("</tr>\n");
403
- lasem_test_html ("</table>\n");
402
+ lasem_test_html ("</td>");
403
+ lasem_test_html ("</tr>\n");
404
+ lasem_test_html ("</table>\n");
405
+ }
404
406
 
405
407
  if (!is_xml && !g_file_test (reference_png_filename, G_FILE_TEST_IS_REGULAR) && !dry_run) {
406
408
  FILE *file;
@@ -476,13 +478,15 @@ lasem_test_process_dir (const char *name, gboolean compare, gboolean dry_run, St
476
478
  strstr (entry, "ignore-") != entry &&
477
479
  strcmp (entry, "images") != 0)
478
480
  {
481
+ gboolean save_png = strstr (entry, "dont-render-") != entry;
482
+
479
483
  filename = g_build_filename (name, entry, NULL);
480
484
 
481
485
  if (g_file_test (filename, G_FILE_TEST_IS_DIR))
482
486
  lasem_test_process_dir (filename, compare, dry_run, statistic);
483
487
  else if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) &&
484
488
  g_regex_match (regex_mml, filename, 0, NULL)) {
485
- lasem_test_render (filename, compare, dry_run, statistic);
489
+ lasem_test_render (filename, compare, dry_run, save_png, statistic);
486
490
  n_files++;
487
491
  }
488
492
 
@@ -570,7 +574,7 @@ main (int argc, char **argv)
570
574
  else {
571
575
  if (n_input_files > 0)
572
576
  for (i = 0; i < n_input_files; i++)
573
- lasem_test_render (option_input_filenames[i], TRUE, option_dry_run, &statistic);
577
+ lasem_test_render (option_input_filenames[i], TRUE, option_dry_run, TRUE, &statistic);
574
578
  else
575
579
  lasem_test_process_dir (".", TRUE, option_dry_run, &statistic);
576
580
  }
@@ -32,7 +32,8 @@ build_file_list (const char *path, GRegex *filename_regex)
32
32
  if (g_file_test (filename, G_FILE_TEST_IS_DIR))
33
33
  files = g_slist_concat (files, build_file_list (filename, filename_regex));
34
34
  else if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) &&
35
- g_regex_match (filename_regex, filename, 0, NULL)) {
35
+ g_regex_match (filename_regex, filename, 0, NULL) &&
36
+ !g_key_file_get_boolean (suite_options, entry, "ignore", NULL)) {
36
37
  files = g_slist_prepend (files, g_strdup (filename));
37
38
  }
38
39
 
@@ -84,8 +85,10 @@ render_test (gconstpointer user_data)
84
85
 
85
86
  if (cairo_status (cairo) != CAIRO_STATUS_SUCCESS) {
86
87
  g_test_message ("cairo_status = %s", cairo_status_to_string (cairo_status (cairo)));
87
- if (!g_key_file_get_boolean (suite_options, basename, "ignore-cairo-status", NULL))
88
+ if (!g_key_file_get_boolean (suite_options, basename, "ignore-cairo-status", NULL)) {
89
+ g_test_message ("incorrect cairo status");
88
90
  g_test_fail ();
91
+ }
89
92
  }
90
93
  }
91
94
 
Binary file