mathematical 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +11 -21
- data/ext/mathematical/extconf.rb +21 -12
- data/ext/mathematical/lasem/Makefile +10 -10
- data/ext/mathematical/lasem/docs/Makefile +9 -9
- data/ext/mathematical/lasem/docs/reference/Makefile +9 -9
- data/ext/mathematical/lasem/docs/reference/lasem/Makefile +15 -9
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-decl-list.txt +245 -0
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-decl.txt +856 -0
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-overrides.txt +0 -0
- data/ext/mathematical/lasem/itex2mml/Makefile +9 -9
- data/ext/mathematical/lasem/src/Makefile +34 -13
- data/ext/mathematical/lasem/src/lasemrender.c +13 -7
- data/ext/mathematical/lasem/src/lsmdomenumtypes.c +99 -0
- data/ext/mathematical/lasem/src/lsmdomenumtypes.h +26 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.c +24 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.h +12 -1
- data/ext/mathematical/lasem/src/lsmmathmlenumtypes.c +793 -0
- data/ext/mathematical/lasem/src/lsmmathmlenumtypes.h +96 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.c +14 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.h +1 -1
- data/ext/mathematical/lasem/src/lsmmathmltraits.c +24 -0
- data/ext/mathematical/lasem/src/lsmmathmltraits.h +1 -0
- data/ext/mathematical/lasem/src/lsmsvgattributes.h +50 -0
- data/ext/mathematical/lasem/src/lsmsvgdocument.c +18 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.c +130 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgenumtypes.c +1254 -0
- data/ext/mathematical/lasem/src/lsmsvgenumtypes.h +129 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.c +115 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.c +206 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.c +124 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.c +167 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.c +116 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.c +9 -2
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +1169 -87
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.h +28 -2
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.c +142 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.c +249 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.h +18 -0
- data/ext/mathematical/lasem/src/lsmsvgtypes.h +6 -0
- data/ext/mathematical/lasem/src/lsmsvgview.c +267 -66
- data/ext/mathematical/lasem/src/lsmsvgview.h +23 -0
- data/ext/mathematical/lasem/src/lsmtraits.c +53 -1
- data/ext/mathematical/lasem/src/lsmtraits.h +2 -0
- data/ext/mathematical/lasem/tests/Makefile +26 -15
- data/ext/mathematical/lasem/tests/filter.c +152 -0
- data/ext/mathematical/lasem/tests/lsmtest.c +34 -30
- data/ext/mathematical/lasem/tests/suite.c +5 -2
- data/ext/mathematical/lib/libmtex2MML.a +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeCache.txt +425 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCCompiler.cmake +55 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCXXCompiler.cmake +56 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeSystem.cmake +15 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c +393 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +34 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +95 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +34 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +44 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +19 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +1 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +43 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +18 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean_target.cmake +3 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +2 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/DependInfo.cmake +27 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/cmake_clean.cmake +8 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +44 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +19 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +1 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +59 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +35 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +1 -0
- data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +7 -0
- data/ext/mathematical/mtex2MML/build/Makefile +1332 -0
- data/ext/mathematical/mtex2MML/build/cmake_install.cmake +43 -0
- data/ext/mathematical/mtex2MML/build/lexer.c +8877 -0
- data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
- data/ext/mathematical/mtex2MML/build/mtex2mml_export.h +35 -0
- data/ext/mathematical/mtex2MML/build/parser.c +10202 -0
- data/ext/mathematical/mtex2MML/build/parser.h +619 -0
- data/ext/mathematical/mtex2MML/src/mtex2MML.h +1 -1
- data/lib/mathematical/version.rb +1 -1
- metadata +115 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
|
|
2
|
+
/* Generated data (by glib-mkenums) */
|
|
3
|
+
|
|
4
|
+
#ifndef LSM_SVG_ENUM_TYPES_H
|
|
5
|
+
#define LSM_SVG_ENUM_TYPES_H
|
|
6
|
+
|
|
7
|
+
#include <glib-object.h>
|
|
8
|
+
|
|
9
|
+
G_BEGIN_DECLS
|
|
10
|
+
|
|
11
|
+
/* Enumerations from "lsmsvgenums.h" */
|
|
12
|
+
|
|
13
|
+
#define LSM_TYPE_SVG_ANGLE_TYPE (lsm_svg_angle_type_get_type())
|
|
14
|
+
GType lsm_svg_angle_type_get_type (void) G_GNUC_CONST;
|
|
15
|
+
|
|
16
|
+
#define LSM_TYPE_SVG_BLENDING_MODE (lsm_svg_blending_mode_get_type())
|
|
17
|
+
GType lsm_svg_blending_mode_get_type (void) G_GNUC_CONST;
|
|
18
|
+
|
|
19
|
+
#define LSM_TYPE_SVG_ENABLE_BACKGROUND (lsm_svg_enable_background_get_type())
|
|
20
|
+
GType lsm_svg_enable_background_get_type (void) G_GNUC_CONST;
|
|
21
|
+
|
|
22
|
+
#define LSM_TYPE_SVG_PAINT_TYPE (lsm_svg_paint_type_get_type())
|
|
23
|
+
GType lsm_svg_paint_type_get_type (void) G_GNUC_CONST;
|
|
24
|
+
|
|
25
|
+
#define LSM_TYPE_SVG_LENGTH_DIRECTION (lsm_svg_length_direction_get_type())
|
|
26
|
+
GType lsm_svg_length_direction_get_type (void) G_GNUC_CONST;
|
|
27
|
+
|
|
28
|
+
#define LSM_TYPE_SVG_LENGTH_TYPE (lsm_svg_length_type_get_type())
|
|
29
|
+
GType lsm_svg_length_type_get_type (void) G_GNUC_CONST;
|
|
30
|
+
|
|
31
|
+
#define LSM_TYPE_SVG_FILL_RULE (lsm_svg_fill_rule_get_type())
|
|
32
|
+
GType lsm_svg_fill_rule_get_type (void) G_GNUC_CONST;
|
|
33
|
+
|
|
34
|
+
#define LSM_TYPE_SVG_LINE_JOIN (lsm_svg_line_join_get_type())
|
|
35
|
+
GType lsm_svg_line_join_get_type (void) G_GNUC_CONST;
|
|
36
|
+
|
|
37
|
+
#define LSM_TYPE_SVG_LINE_CAP (lsm_svg_line_cap_get_type())
|
|
38
|
+
GType lsm_svg_line_cap_get_type (void) G_GNUC_CONST;
|
|
39
|
+
|
|
40
|
+
#define LSM_TYPE_SVG_TRANSFORM_TYPE (lsm_svg_transform_type_get_type())
|
|
41
|
+
GType lsm_svg_transform_type_get_type (void) G_GNUC_CONST;
|
|
42
|
+
|
|
43
|
+
#define LSM_TYPE_SVG_OVERFLOW (lsm_svg_overflow_get_type())
|
|
44
|
+
GType lsm_svg_overflow_get_type (void) G_GNUC_CONST;
|
|
45
|
+
|
|
46
|
+
#define LSM_TYPE_SVG_PATTERN_UNITS (lsm_svg_pattern_units_get_type())
|
|
47
|
+
GType lsm_svg_pattern_units_get_type (void) G_GNUC_CONST;
|
|
48
|
+
|
|
49
|
+
#define LSM_TYPE_SVG_MARKER_UNITS (lsm_svg_marker_units_get_type())
|
|
50
|
+
GType lsm_svg_marker_units_get_type (void) G_GNUC_CONST;
|
|
51
|
+
|
|
52
|
+
#define LSM_TYPE_SVG_SPREAD_METHOD (lsm_svg_spread_method_get_type())
|
|
53
|
+
GType lsm_svg_spread_method_get_type (void) G_GNUC_CONST;
|
|
54
|
+
|
|
55
|
+
#define LSM_TYPE_SVG_ALIGN (lsm_svg_align_get_type())
|
|
56
|
+
GType lsm_svg_align_get_type (void) G_GNUC_CONST;
|
|
57
|
+
|
|
58
|
+
#define LSM_TYPE_SVG_MEET_OR_SLICE (lsm_svg_meet_or_slice_get_type())
|
|
59
|
+
GType lsm_svg_meet_or_slice_get_type (void) G_GNUC_CONST;
|
|
60
|
+
|
|
61
|
+
#define LSM_TYPE_SVG_COMP_OP (lsm_svg_comp_op_get_type())
|
|
62
|
+
GType lsm_svg_comp_op_get_type (void) G_GNUC_CONST;
|
|
63
|
+
|
|
64
|
+
#define LSM_TYPE_SVG_FONT_STRETCH (lsm_svg_font_stretch_get_type())
|
|
65
|
+
GType lsm_svg_font_stretch_get_type (void) G_GNUC_CONST;
|
|
66
|
+
|
|
67
|
+
#define LSM_TYPE_SVG_FONT_STYLE (lsm_svg_font_style_get_type())
|
|
68
|
+
GType lsm_svg_font_style_get_type (void) G_GNUC_CONST;
|
|
69
|
+
|
|
70
|
+
#define LSM_TYPE_SVG_FONT_WEIGHT (lsm_svg_font_weight_get_type())
|
|
71
|
+
GType lsm_svg_font_weight_get_type (void) G_GNUC_CONST;
|
|
72
|
+
|
|
73
|
+
#define LSM_TYPE_SVG_TEXT_ANCHOR (lsm_svg_text_anchor_get_type())
|
|
74
|
+
GType lsm_svg_text_anchor_get_type (void) G_GNUC_CONST;
|
|
75
|
+
|
|
76
|
+
#define LSM_TYPE_SVG_FILTER_INPUT (lsm_svg_filter_input_get_type())
|
|
77
|
+
GType lsm_svg_filter_input_get_type (void) G_GNUC_CONST;
|
|
78
|
+
|
|
79
|
+
#define LSM_TYPE_SVG_DISPLAY (lsm_svg_display_get_type())
|
|
80
|
+
GType lsm_svg_display_get_type (void) G_GNUC_CONST;
|
|
81
|
+
|
|
82
|
+
#define LSM_TYPE_SVG_VISIBILITY (lsm_svg_visibility_get_type())
|
|
83
|
+
GType lsm_svg_visibility_get_type (void) G_GNUC_CONST;
|
|
84
|
+
|
|
85
|
+
#define LSM_TYPE_SVG_ELEMENT_CATEGORY (lsm_svg_element_category_get_type())
|
|
86
|
+
GType lsm_svg_element_category_get_type (void) G_GNUC_CONST;
|
|
87
|
+
|
|
88
|
+
#define LSM_TYPE_SVG_WRITING_MODE (lsm_svg_writing_mode_get_type())
|
|
89
|
+
GType lsm_svg_writing_mode_get_type (void) G_GNUC_CONST;
|
|
90
|
+
|
|
91
|
+
#define LSM_TYPE_SVG_COLOR_FILTER_TYPE (lsm_svg_color_filter_type_get_type())
|
|
92
|
+
GType lsm_svg_color_filter_type_get_type (void) G_GNUC_CONST;
|
|
93
|
+
|
|
94
|
+
#define LSM_TYPE_SVG_MORPHOLOGY_OPERATOR (lsm_svg_morphology_operator_get_type())
|
|
95
|
+
GType lsm_svg_morphology_operator_get_type (void) G_GNUC_CONST;
|
|
96
|
+
|
|
97
|
+
#define LSM_TYPE_SVG_EDGE_MODE (lsm_svg_edge_mode_get_type())
|
|
98
|
+
GType lsm_svg_edge_mode_get_type (void) G_GNUC_CONST;
|
|
99
|
+
|
|
100
|
+
#define LSM_TYPE_SVG_STITCH_TILES (lsm_svg_stitch_tiles_get_type())
|
|
101
|
+
GType lsm_svg_stitch_tiles_get_type (void) G_GNUC_CONST;
|
|
102
|
+
|
|
103
|
+
#define LSM_TYPE_SVG_TURBULENCE_TYPE (lsm_svg_turbulence_type_get_type())
|
|
104
|
+
GType lsm_svg_turbulence_type_get_type (void) G_GNUC_CONST;
|
|
105
|
+
|
|
106
|
+
#define LSM_TYPE_SVG_CHANNEL_SELECTOR (lsm_svg_channel_selector_get_type())
|
|
107
|
+
GType lsm_svg_channel_selector_get_type (void) G_GNUC_CONST;
|
|
108
|
+
|
|
109
|
+
/* Enumerations from "lsmsvgview.h" */
|
|
110
|
+
|
|
111
|
+
#define LSM_TYPE_SVG_VIEW_SURFACE_TYPE (lsm_svg_view_surface_type_get_type())
|
|
112
|
+
GType lsm_svg_view_surface_type_get_type (void) G_GNUC_CONST;
|
|
113
|
+
|
|
114
|
+
/* Enumerations from "lsmsvgmatrix.h" */
|
|
115
|
+
|
|
116
|
+
#define LSM_TYPE_SVG_MATRIX_FLAGS (lsm_svg_matrix_flags_get_type())
|
|
117
|
+
GType lsm_svg_matrix_flags_get_type (void) G_GNUC_CONST;
|
|
118
|
+
|
|
119
|
+
/* Enumerations from "lsmsvguseelement.h" */
|
|
120
|
+
|
|
121
|
+
#define LSM_TYPE_SVG_USE_ELEMENT_FLAGS (lsm_svg_use_element_flags_get_type())
|
|
122
|
+
GType lsm_svg_use_element_flags_get_type (void) G_GNUC_CONST;
|
|
123
|
+
|
|
124
|
+
G_END_DECLS
|
|
125
|
+
|
|
126
|
+
#endif /* LSM_SVG_ENUM_TYPES_H */
|
|
127
|
+
|
|
128
|
+
/* Generated data ends here */
|
|
129
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* Lasem
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2012 Emmanuel Pacaud
|
|
4
|
+
*
|
|
5
|
+
* This library is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
7
|
+
* License as published by the Free Software Foundation; either
|
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This library 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 GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General
|
|
16
|
+
* Public License along with this library; if not, write to the
|
|
17
|
+
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
18
|
+
* Boston, MA 02111-1307, USA.
|
|
19
|
+
*
|
|
20
|
+
* Author:
|
|
21
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#include <lsmsvgfiltercolormatrix.h>
|
|
25
|
+
#include <lsmsvgview.h>
|
|
26
|
+
|
|
27
|
+
static GObjectClass *parent_class;
|
|
28
|
+
|
|
29
|
+
/* GdomNode implementation */
|
|
30
|
+
|
|
31
|
+
static const char *
|
|
32
|
+
lsm_svg_filter_color_matrix_get_node_name (LsmDomNode *node)
|
|
33
|
+
{
|
|
34
|
+
return "feColorMatrix";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* LsmSvgElement implementation */
|
|
38
|
+
|
|
39
|
+
static void
|
|
40
|
+
lsm_svg_filter_color_matrix_apply (LsmSvgFilterPrimitive *self, LsmSvgView *view,
|
|
41
|
+
const char *input, const char *output, const LsmBox *subregion)
|
|
42
|
+
{
|
|
43
|
+
LsmSvgFilterColorMatrix *color_matrix = LSM_SVG_FILTER_COLOR_MATRIX (self);
|
|
44
|
+
|
|
45
|
+
lsm_svg_view_apply_color_matrix (view, input, output, subregion,
|
|
46
|
+
color_matrix->type.value,
|
|
47
|
+
color_matrix->values.value.n_values,
|
|
48
|
+
color_matrix->values.value.values);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* LsmSvgFilterColorMatrix implementation */
|
|
52
|
+
|
|
53
|
+
static const LsmSvgColorFilterType color_filter_type_default = LSM_SVG_COLOR_FILTER_TYPE_MATRIX;
|
|
54
|
+
static const LsmSvgVector values_default = { .n_values = 0, .values = NULL};
|
|
55
|
+
|
|
56
|
+
LsmDomNode *
|
|
57
|
+
lsm_svg_filter_color_matrix_new (void)
|
|
58
|
+
{
|
|
59
|
+
return g_object_new (LSM_TYPE_SVG_FILTER_COLOR_MATRIX, NULL);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static void
|
|
63
|
+
lsm_svg_filter_color_matrix_init (LsmSvgFilterColorMatrix *self)
|
|
64
|
+
{
|
|
65
|
+
self->type.value = color_filter_type_default;
|
|
66
|
+
self->values.value = values_default;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static void
|
|
70
|
+
lsm_svg_filter_color_matrix_finalize (GObject *object)
|
|
71
|
+
{
|
|
72
|
+
parent_class->finalize (object);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* LsmSvgFilterColorMatrix class */
|
|
76
|
+
|
|
77
|
+
static const LsmAttributeInfos lsm_svg_filter_color_matrix_attribute_infos[] = {
|
|
78
|
+
{
|
|
79
|
+
.name = "type",
|
|
80
|
+
.attribute_offset = offsetof (LsmSvgFilterColorMatrix, type),
|
|
81
|
+
.trait_class = &lsm_svg_color_filter_type_trait_class,
|
|
82
|
+
.trait_default = &color_filter_type_default
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
.name = "values",
|
|
86
|
+
.attribute_offset = offsetof (LsmSvgFilterColorMatrix, values),
|
|
87
|
+
.trait_class = &lsm_svg_vector_trait_class,
|
|
88
|
+
.trait_default = &values_default
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
static void
|
|
93
|
+
lsm_svg_filter_color_matrix_class_init (LsmSvgFilterColorMatrixClass *klass)
|
|
94
|
+
{
|
|
95
|
+
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
96
|
+
LsmDomNodeClass *d_node_class = LSM_DOM_NODE_CLASS (klass);
|
|
97
|
+
LsmSvgElementClass *s_element_class = LSM_SVG_ELEMENT_CLASS (klass);
|
|
98
|
+
LsmSvgFilterPrimitiveClass *f_primitive_class = LSM_SVG_FILTER_PRIMITIVE_CLASS (klass);
|
|
99
|
+
|
|
100
|
+
parent_class = g_type_class_peek_parent (klass);
|
|
101
|
+
|
|
102
|
+
object_class->finalize = lsm_svg_filter_color_matrix_finalize;
|
|
103
|
+
|
|
104
|
+
d_node_class->get_node_name = lsm_svg_filter_color_matrix_get_node_name;
|
|
105
|
+
|
|
106
|
+
s_element_class->attribute_manager = lsm_attribute_manager_duplicate (s_element_class->attribute_manager);
|
|
107
|
+
|
|
108
|
+
lsm_attribute_manager_add_attributes (s_element_class->attribute_manager,
|
|
109
|
+
G_N_ELEMENTS (lsm_svg_filter_color_matrix_attribute_infos),
|
|
110
|
+
lsm_svg_filter_color_matrix_attribute_infos);
|
|
111
|
+
|
|
112
|
+
f_primitive_class->apply = lsm_svg_filter_color_matrix_apply;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
G_DEFINE_TYPE (LsmSvgFilterColorMatrix, lsm_svg_filter_color_matrix, LSM_TYPE_SVG_FILTER_PRIMITIVE)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Lasem
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2015 Emmanuel Pacaud
|
|
4
|
+
*
|
|
5
|
+
* This library is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
7
|
+
* License as published by the Free Software Foundation; either
|
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This library 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 GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General
|
|
16
|
+
* Public License along with this library; if not, write to the
|
|
17
|
+
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
18
|
+
* Boston, MA 02111-1307, USA.
|
|
19
|
+
*
|
|
20
|
+
* Author:
|
|
21
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#ifndef LSM_SVG_FILTER_COLOR_MATRIX_H
|
|
25
|
+
#define LSM_SVG_FILTER_COLOR_MATRIX_H
|
|
26
|
+
|
|
27
|
+
#include <lsmsvgtypes.h>
|
|
28
|
+
#include <lsmsvgfilterprimitive.h>
|
|
29
|
+
|
|
30
|
+
G_BEGIN_DECLS
|
|
31
|
+
|
|
32
|
+
#define LSM_TYPE_SVG_FILTER_COLOR_MATRIX (lsm_svg_filter_color_matrix_get_type ())
|
|
33
|
+
#define LSM_SVG_FILTER_COLOR_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_SVG_FILTER_COLOR_MATRIX, LsmSvgFilterColorMatrix))
|
|
34
|
+
#define LSM_SVG_FILTER_COLOR_MATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_SVG_FILTER_COLOR_MATRIX, LsmSvgFilterColorMatrixClass))
|
|
35
|
+
#define LSM_IS_SVG_FILTER_COLOR_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_SVG_FILTER_COLOR_MATRIX))
|
|
36
|
+
#define LSM_IS_SVG_FILTER_COLOR_MATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_SVG_FILTER_COLOR_MATRIX))
|
|
37
|
+
#define LSM_SVG_FILTER_COLOR_MATRIX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_SVG_FILTER_COLOR_MATRIX, LsmSvgFilterColorMatrixClass))
|
|
38
|
+
|
|
39
|
+
typedef struct _LsmSvgFilterColorMatrixClass LsmSvgFilterColorMatrixClass;
|
|
40
|
+
|
|
41
|
+
struct _LsmSvgFilterColorMatrix {
|
|
42
|
+
LsmSvgFilterPrimitive base;
|
|
43
|
+
|
|
44
|
+
LsmSvgColorFilterTypeAttribute type;
|
|
45
|
+
LsmSvgVectorAttribute values;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
struct _LsmSvgFilterColorMatrixClass {
|
|
49
|
+
LsmSvgFilterPrimitiveClass element_class;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
GType lsm_svg_filter_color_matrix_get_type (void);
|
|
53
|
+
|
|
54
|
+
LsmDomNode * lsm_svg_filter_color_matrix_new (void);
|
|
55
|
+
|
|
56
|
+
G_END_DECLS
|
|
57
|
+
|
|
58
|
+
#endif
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/* Lasem
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2015 Emmanuel Pacaud
|
|
4
|
+
*
|
|
5
|
+
* This library is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
7
|
+
* License as published by the Free Software Foundation; either
|
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This library 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 GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General
|
|
16
|
+
* Public License along with this library; if not, write to the
|
|
17
|
+
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
18
|
+
* Boston, MA 02111-1307, USA.
|
|
19
|
+
*
|
|
20
|
+
* Author:
|
|
21
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#include <lsmsvgfilterconvolvematrix.h>
|
|
25
|
+
#include <lsmsvgview.h>
|
|
26
|
+
|
|
27
|
+
static GObjectClass *parent_class;
|
|
28
|
+
|
|
29
|
+
/* GdomNode implementation */
|
|
30
|
+
|
|
31
|
+
static const char *
|
|
32
|
+
lsm_svg_filter_convolve_matrix_get_node_name (LsmDomNode *node)
|
|
33
|
+
{
|
|
34
|
+
return "feConvolveMatrix";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* LsmSvgElement implementation */
|
|
38
|
+
|
|
39
|
+
static void
|
|
40
|
+
lsm_svg_filter_convolve_matrix_apply (LsmSvgFilterPrimitive *self, LsmSvgView *view,
|
|
41
|
+
const char *input, const char *output, const LsmBox *subregion)
|
|
42
|
+
{
|
|
43
|
+
double divisor;
|
|
44
|
+
int order_x;
|
|
45
|
+
int order_y;
|
|
46
|
+
int target_x;
|
|
47
|
+
int target_y;
|
|
48
|
+
|
|
49
|
+
LsmSvgFilterConvolveMatrix *convolve_matrix = LSM_SVG_FILTER_CONVOLVE_MATRIX (self);
|
|
50
|
+
|
|
51
|
+
order_x = convolve_matrix->order.value.a;
|
|
52
|
+
order_y = convolve_matrix->order.value.b;
|
|
53
|
+
|
|
54
|
+
if (lsm_attribute_is_defined (&convolve_matrix->target_x.base))
|
|
55
|
+
target_x = convolve_matrix->target_x.value;
|
|
56
|
+
else
|
|
57
|
+
target_x = order_x / 2;
|
|
58
|
+
|
|
59
|
+
if (lsm_attribute_is_defined (&convolve_matrix->target_y.base))
|
|
60
|
+
target_y = convolve_matrix->target_y.value;
|
|
61
|
+
else
|
|
62
|
+
target_y = order_y / 2;
|
|
63
|
+
|
|
64
|
+
target_x = CLAMP (target_x, 0, order_x);
|
|
65
|
+
target_y = CLAMP (target_y, 0, order_y);
|
|
66
|
+
|
|
67
|
+
if (lsm_attribute_is_defined (&convolve_matrix->divisor.base))
|
|
68
|
+
divisor = convolve_matrix->divisor.value;
|
|
69
|
+
else {
|
|
70
|
+
int i;
|
|
71
|
+
|
|
72
|
+
divisor = 0.0;
|
|
73
|
+
|
|
74
|
+
for (i = 0; i < convolve_matrix->kernel.value.n_values; i++)
|
|
75
|
+
divisor += convolve_matrix->kernel.value.values[i];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (divisor <= 0.0) {
|
|
79
|
+
lsm_warning_dom ("[SvgFilterConvolveMatrix::apply] Invalid divisor");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
lsm_svg_view_apply_convolve_matrix (view, input, output, subregion,
|
|
84
|
+
order_x, order_y,
|
|
85
|
+
convolve_matrix->kernel.value.n_values,
|
|
86
|
+
convolve_matrix->kernel.value.values,
|
|
87
|
+
divisor,
|
|
88
|
+
convolve_matrix->bias.value,
|
|
89
|
+
target_x,
|
|
90
|
+
target_y,
|
|
91
|
+
convolve_matrix->edge_mode.value,
|
|
92
|
+
convolve_matrix->preserve_alpha.value);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* LsmSvgFilterConvolveMatrix implementation */
|
|
96
|
+
|
|
97
|
+
LsmDomNode *
|
|
98
|
+
lsm_svg_filter_convolve_matrix_new (void)
|
|
99
|
+
{
|
|
100
|
+
return g_object_new (LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX, NULL);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static const LsmSvgOneOrTwoInteger order_default = {0, 0};
|
|
104
|
+
static const LsmSvgVector kernel_default = { .n_values = 0, .values = NULL};
|
|
105
|
+
static const double divisor_default = 0.0;
|
|
106
|
+
static const double bias_default = 0.0;
|
|
107
|
+
static const int target_default = -1;
|
|
108
|
+
static const LsmSvgEdgeMode edge_mode_default = LSM_SVG_EDGE_MODE_NONE;
|
|
109
|
+
static const gboolean preserve_alpha_default = FALSE;
|
|
110
|
+
|
|
111
|
+
static void
|
|
112
|
+
lsm_svg_filter_convolve_matrix_init (LsmSvgFilterConvolveMatrix *self)
|
|
113
|
+
{
|
|
114
|
+
self->order.value = order_default;
|
|
115
|
+
self->kernel.value = kernel_default;
|
|
116
|
+
self->divisor.value = divisor_default;
|
|
117
|
+
self->bias.value = bias_default;
|
|
118
|
+
self->target_x.value = target_default;
|
|
119
|
+
self->target_y.value = target_default;
|
|
120
|
+
self->edge_mode.value = edge_mode_default;
|
|
121
|
+
self->preserve_alpha.value = preserve_alpha_default;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static void
|
|
125
|
+
lsm_svg_filter_convolve_matrix_finalize (GObject *object)
|
|
126
|
+
{
|
|
127
|
+
parent_class->finalize (object);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* LsmSvgFilterConvolveMatrix class */
|
|
131
|
+
|
|
132
|
+
static const LsmAttributeInfos lsm_svg_filter_convolve_matrix_attribute_infos[] = {
|
|
133
|
+
{
|
|
134
|
+
.name = "order",
|
|
135
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, order),
|
|
136
|
+
.trait_class = &lsm_svg_one_or_two_integer_trait_class,
|
|
137
|
+
.trait_default = &order_default
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
.name = "kernelMatrix",
|
|
141
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, kernel),
|
|
142
|
+
.trait_class = &lsm_svg_vector_trait_class,
|
|
143
|
+
.trait_default = &kernel_default
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
.name = "divisor",
|
|
147
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, divisor),
|
|
148
|
+
.trait_class = &lsm_double_trait_class,
|
|
149
|
+
.trait_default = &divisor_default
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
.name = "bias",
|
|
153
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, bias),
|
|
154
|
+
.trait_class = &lsm_double_trait_class,
|
|
155
|
+
.trait_default = &bias_default
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
.name = "targetX",
|
|
159
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, target_x),
|
|
160
|
+
.trait_class = &lsm_integer_trait_class,
|
|
161
|
+
.trait_default = &target_default
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
.name = "targetY",
|
|
165
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, target_y),
|
|
166
|
+
.trait_class = &lsm_integer_trait_class,
|
|
167
|
+
.trait_default = &target_default
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
.name = "edgeMode",
|
|
171
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, edge_mode),
|
|
172
|
+
.trait_class = &lsm_svg_edge_mode_trait_class,
|
|
173
|
+
.trait_default = &edge_mode_default
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
.name = "preserveAlpha",
|
|
177
|
+
.attribute_offset = offsetof (LsmSvgFilterConvolveMatrix, preserve_alpha),
|
|
178
|
+
.trait_class = &lsm_boolean_trait_class,
|
|
179
|
+
.trait_default = &preserve_alpha_default
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
static void
|
|
184
|
+
lsm_svg_filter_convolve_matrix_class_init (LsmSvgFilterConvolveMatrixClass *klass)
|
|
185
|
+
{
|
|
186
|
+
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
187
|
+
LsmDomNodeClass *d_node_class = LSM_DOM_NODE_CLASS (klass);
|
|
188
|
+
LsmSvgElementClass *s_element_class = LSM_SVG_ELEMENT_CLASS (klass);
|
|
189
|
+
LsmSvgFilterPrimitiveClass *f_primitive_class = LSM_SVG_FILTER_PRIMITIVE_CLASS (klass);
|
|
190
|
+
|
|
191
|
+
parent_class = g_type_class_peek_parent (klass);
|
|
192
|
+
|
|
193
|
+
object_class->finalize = lsm_svg_filter_convolve_matrix_finalize;
|
|
194
|
+
|
|
195
|
+
d_node_class->get_node_name = lsm_svg_filter_convolve_matrix_get_node_name;
|
|
196
|
+
|
|
197
|
+
s_element_class->attribute_manager = lsm_attribute_manager_duplicate (s_element_class->attribute_manager);
|
|
198
|
+
|
|
199
|
+
lsm_attribute_manager_add_attributes (s_element_class->attribute_manager,
|
|
200
|
+
G_N_ELEMENTS (lsm_svg_filter_convolve_matrix_attribute_infos),
|
|
201
|
+
lsm_svg_filter_convolve_matrix_attribute_infos);
|
|
202
|
+
|
|
203
|
+
f_primitive_class->apply = lsm_svg_filter_convolve_matrix_apply;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
G_DEFINE_TYPE (LsmSvgFilterConvolveMatrix, lsm_svg_filter_convolve_matrix, LSM_TYPE_SVG_FILTER_PRIMITIVE)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* Lasem
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2015 Emmanuel Pacaud
|
|
4
|
+
*
|
|
5
|
+
* This library is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
7
|
+
* License as published by the Free Software Foundation; either
|
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This library 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 GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General
|
|
16
|
+
* Public License along with this library; if not, write to the
|
|
17
|
+
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
18
|
+
* Boston, MA 02111-1307, USA.
|
|
19
|
+
*
|
|
20
|
+
* Author:
|
|
21
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#ifndef LSM_SVG_FILTER_CONVOLVE_MATRIX_H
|
|
25
|
+
#define LSM_SVG_FILTER_CONVOLVE_MATRIX_H
|
|
26
|
+
|
|
27
|
+
#include <lsmsvgtypes.h>
|
|
28
|
+
#include <lsmsvgfilterprimitive.h>
|
|
29
|
+
|
|
30
|
+
G_BEGIN_DECLS
|
|
31
|
+
|
|
32
|
+
#define LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX (lsm_svg_filter_convolve_matrix_get_type ())
|
|
33
|
+
#define LSM_SVG_FILTER_CONVOLVE_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX, LsmSvgFilterConvolveMatrix))
|
|
34
|
+
#define LSM_SVG_FILTER_CONVOLVE_MATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX, LsmSvgFilterConvolveMatrixClass))
|
|
35
|
+
#define LSM_IS_SVG_FILTER_CONVOLVE_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX))
|
|
36
|
+
#define LSM_IS_SVG_FILTER_CONVOLVE_MATRIX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX))
|
|
37
|
+
#define LSM_SVG_FILTER_CONVOLVE_MATRIX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_SVG_FILTER_CONVOLVE_MATRIX, LsmSvgFilterConvolveMatrixClass))
|
|
38
|
+
|
|
39
|
+
typedef struct _LsmSvgFilterConvolveMatrixClass LsmSvgFilterConvolveMatrixClass;
|
|
40
|
+
|
|
41
|
+
struct _LsmSvgFilterConvolveMatrix {
|
|
42
|
+
LsmSvgFilterPrimitive base;
|
|
43
|
+
|
|
44
|
+
LsmSvgOneOrTwoIntegerAttribute order;
|
|
45
|
+
LsmSvgVectorAttribute kernel;
|
|
46
|
+
LsmSvgDoubleAttribute divisor;
|
|
47
|
+
LsmSvgDoubleAttribute bias;
|
|
48
|
+
LsmSvgIntegerAttribute target_x;
|
|
49
|
+
LsmSvgIntegerAttribute target_y;
|
|
50
|
+
LsmSvgEdgeModeAttribute edge_mode;
|
|
51
|
+
LsmSvgBooleanAttribute preserve_alpha;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
struct _LsmSvgFilterConvolveMatrixClass {
|
|
55
|
+
LsmSvgFilterPrimitiveClass element_class;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
GType lsm_svg_filter_convolve_matrix_get_type (void);
|
|
59
|
+
|
|
60
|
+
LsmDomNode * lsm_svg_filter_convolve_matrix_new (void);
|
|
61
|
+
|
|
62
|
+
G_END_DECLS
|
|
63
|
+
|
|
64
|
+
#endif
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* Lasem
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2015 Emmanuel Pacaud
|
|
4
|
+
*
|
|
5
|
+
* This library is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
7
|
+
* License as published by the Free Software Foundation; either
|
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This library 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 GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General
|
|
16
|
+
* Public License along with this library; if not, write to the
|
|
17
|
+
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
18
|
+
* Boston, MA 02111-1307, USA.
|
|
19
|
+
*
|
|
20
|
+
* Author:
|
|
21
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#include <lsmsvgfilterdisplacementmap.h>
|
|
25
|
+
#include <lsmsvgview.h>
|
|
26
|
+
|
|
27
|
+
static GObjectClass *parent_class;
|
|
28
|
+
|
|
29
|
+
/* GdomNode implementation */
|
|
30
|
+
|
|
31
|
+
static const char *
|
|
32
|
+
lsm_svg_filter_displacement_map_get_node_name (LsmDomNode *node)
|
|
33
|
+
{
|
|
34
|
+
return "feDisplacementMap";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* LsmSvgElement implementation */
|
|
38
|
+
|
|
39
|
+
static void
|
|
40
|
+
lsm_svg_filter_displacement_map_apply (LsmSvgFilterPrimitive *self, LsmSvgView *view,
|
|
41
|
+
const char *input, const char *output, const LsmBox *subregion)
|
|
42
|
+
{
|
|
43
|
+
LsmSvgFilterDisplacementMap *displacement_map = LSM_SVG_FILTER_DISPLACEMENT_MAP (self);
|
|
44
|
+
|
|
45
|
+
lsm_svg_view_apply_displacement_map (view, input, displacement_map->in2.value, output, subregion,
|
|
46
|
+
displacement_map->scale.value,
|
|
47
|
+
displacement_map->x_channel_selector.value,
|
|
48
|
+
displacement_map->y_channel_selector.value);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* LsmSvgFilterDisplacementMap implementation */
|
|
52
|
+
|
|
53
|
+
LsmDomNode *
|
|
54
|
+
lsm_svg_filter_displacement_map_new (void)
|
|
55
|
+
{
|
|
56
|
+
return g_object_new (LSM_TYPE_SVG_FILTER_DISPLACEMENT_MAP, NULL);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static double scale_default = 0.0;
|
|
60
|
+
static LsmSvgChannelSelector channel_selector_default = LSM_SVG_CHANNEL_SELECTOR_ALPHA;
|
|
61
|
+
|
|
62
|
+
static void
|
|
63
|
+
lsm_svg_filter_displacement_map_init (LsmSvgFilterDisplacementMap *self)
|
|
64
|
+
{
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static void
|
|
68
|
+
lsm_svg_filter_displacement_map_finalize (GObject *object)
|
|
69
|
+
{
|
|
70
|
+
parent_class->finalize (object);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* LsmSvgFilterDisplacementMap class */
|
|
74
|
+
|
|
75
|
+
static const LsmAttributeInfos lsm_svg_filter_displacement_map_attribute_infos[] = {
|
|
76
|
+
{
|
|
77
|
+
.name = "in2",
|
|
78
|
+
.attribute_offset = offsetof (LsmSvgFilterDisplacementMap, in2),
|
|
79
|
+
.trait_class = &lsm_null_trait_class
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
.name = "scale",
|
|
83
|
+
.attribute_offset = offsetof (LsmSvgFilterDisplacementMap, scale),
|
|
84
|
+
.trait_class = &lsm_double_trait_class,
|
|
85
|
+
.trait_default = &scale_default
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
.name = "xChannelSelector",
|
|
89
|
+
.attribute_offset = offsetof (LsmSvgFilterDisplacementMap, x_channel_selector),
|
|
90
|
+
.trait_class = &lsm_svg_channel_selector_trait_class,
|
|
91
|
+
.trait_default = &channel_selector_default
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
.name = "yChannelSelector",
|
|
95
|
+
.attribute_offset = offsetof (LsmSvgFilterDisplacementMap, y_channel_selector),
|
|
96
|
+
.trait_class = &lsm_svg_channel_selector_trait_class,
|
|
97
|
+
.trait_default = &channel_selector_default
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
static void
|
|
102
|
+
lsm_svg_filter_displacement_map_class_init (LsmSvgFilterDisplacementMapClass *klass)
|
|
103
|
+
{
|
|
104
|
+
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
105
|
+
LsmDomNodeClass *d_node_class = LSM_DOM_NODE_CLASS (klass);
|
|
106
|
+
LsmSvgElementClass *s_element_class = LSM_SVG_ELEMENT_CLASS (klass);
|
|
107
|
+
LsmSvgFilterPrimitiveClass *f_primitive_class = LSM_SVG_FILTER_PRIMITIVE_CLASS (klass);
|
|
108
|
+
|
|
109
|
+
parent_class = g_type_class_peek_parent (klass);
|
|
110
|
+
|
|
111
|
+
object_class->finalize = lsm_svg_filter_displacement_map_finalize;
|
|
112
|
+
|
|
113
|
+
d_node_class->get_node_name = lsm_svg_filter_displacement_map_get_node_name;
|
|
114
|
+
|
|
115
|
+
s_element_class->attribute_manager = lsm_attribute_manager_duplicate (s_element_class->attribute_manager);
|
|
116
|
+
|
|
117
|
+
lsm_attribute_manager_add_attributes (s_element_class->attribute_manager,
|
|
118
|
+
G_N_ELEMENTS (lsm_svg_filter_displacement_map_attribute_infos),
|
|
119
|
+
lsm_svg_filter_displacement_map_attribute_infos);
|
|
120
|
+
|
|
121
|
+
f_primitive_class->apply = lsm_svg_filter_displacement_map_apply;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
G_DEFINE_TYPE (LsmSvgFilterDisplacementMap, lsm_svg_filter_displacement_map, LSM_TYPE_SVG_FILTER_PRIMITIVE)
|