summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rnc
blob: 9d4cc259ef4e1be7183aa33c7f8ff055533f7791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
default namespace = "http://www.w3.org/2000/svg"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"


## 
##     SVG 1.1 Filter Module
##     file: svg-filter.rng
## 
##     This is SVG, a language for describing two-dimensional graphics in XML.
##     Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.
## 
##     $Id: svg-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $
##   

## 
##     Filter
## 
##         filter, feBlend, feColorMatrix, feComponentTransfer, feComposite,
##         feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood,
##         feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset,
##         feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight,
##         feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA
## 
##     This module declares markup to provide support for filter effect.
##   
[ xml:lang = "en" ]
grammar {
  include "svg-basic-filter.rnc"
  
  ## 
  ##       extend SVG.FilterPrimitive.class
  ##     
  SVG.FilterPrimitive.class |=
    feConvolveMatrix
    | feDiffuseLighting
    | feDisplacementMap
    | feMorphology
    | feSpecularLighting
    | feTurbulence
  a:documentation [
    "\x{a}" ~
    "    feConvolveMatrix: Filter Effect Convolve Matrix Element\x{a}" ~
    "  "
  ]
  SVG.feConvolveMatrix.content = (animate | set)*
  feConvolveMatrix =
    element feConvolveMatrix {
      attlist.feConvolveMatrix, SVG.feConvolveMatrix.content
    }
  attlist.feConvolveMatrix &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute order { NumberOptionalNumber.datatype },
    attribute kernelMatrix { text },
    attribute divisor { Number.datatype }?,
    attribute bias { Number.datatype }?,
    attribute targetX { Integer.datatype }?,
    attribute targetY { Integer.datatype }?,
    [ a:defaultValue = "duplicate" ]
    attribute edgeMode { "duplicate" | "wrap" | "none" }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?,
    attribute preserveAlpha { Boolean.datatype }?
  a:documentation [
    "\x{a}" ~
    "    feDiffuseLighting: Filter Effect Diffuse Lighting Element\x{a}" ~
    "  "
  ]
  SVG.feDiffuseLighting.content =
    (feDistantLight | fePointLight | feSpotLight),
    (animate | set | animateColor)*
  feDiffuseLighting =
    element feDiffuseLighting {
      attlist.feDiffuseLighting, SVG.feDiffuseLighting.content
    }
  attlist.feDiffuseLighting &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute lighting-color { SVGColor.datatype }?,
    attribute surfaceScale { Number.datatype }?,
    attribute diffuseConstant { Number.datatype }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?
  a:documentation [
    "\x{a}" ~
    "    feDisplacementMap: Filter Effect Displacement Map Element\x{a}" ~
    "  "
  ]
  SVG.feDisplacementMap.content = (animate | set)*
  feDisplacementMap =
    element feDisplacementMap {
      attlist.feDisplacementMap, SVG.feDisplacementMap.content
    }
  attlist.feDisplacementMap &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute in2 { text },
    attribute scale { Number.datatype }?,
    [ a:defaultValue = "A" ]
    attribute xChannelSelector { "R" | "G" | "B" | "A" }?,
    [ a:defaultValue = "A" ]
    attribute yChannelSelector { "R" | "G" | "B" | "A" }?
  a:documentation [
    "\x{a}" ~
    "    feMorphology: Filter Effect Morphology Element\x{a}" ~
    "  "
  ]
  SVG.feMorphology.content = (animate | set)*
  feMorphology =
    element feMorphology {
      attlist.feMorphology, SVG.feMorphology.content
    }
  attlist.feMorphology &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    [ a:defaultValue = "erode" ]
    attribute operator { "erode" | "dilate" }?,
    attribute radius { NumberOptionalNumber.datatype }?
  a:documentation [
    "\x{a}" ~
    "    feSpecularLighting: Filter Effect Specular Lighting Element\x{a}" ~
    "  "
  ]
  SVG.feSpecularLighting.content =
    (feDistantLight | fePointLight | feSpotLight),
    (animate | set | animateColor)*
  feSpecularLighting =
    element feSpecularLighting {
      attlist.feSpecularLighting, SVG.feSpecularLighting.content
    }
  attlist.feSpecularLighting &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute lighting-color { SVGColor.datatype }?,
    attribute surfaceScale { Number.datatype }?,
    attribute specularConstant { Number.datatype }?,
    attribute specularExponent { Number.datatype }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?
  a:documentation [
    "\x{a}" ~
    "    feTurbulence: Filter Effect Turbulence Element\x{a}" ~
    "  "
  ]
  SVG.feTurbulence.content = (animate | set)*
  feTurbulence =
    element feTurbulence {
      attlist.feTurbulence, SVG.feTurbulence.content
    }
  attlist.feTurbulence &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitive.attrib,
    attribute baseFrequency { NumberOptionalNumber.datatype }?,
    attribute numOctaves { Integer.datatype }?,
    attribute seed { Number.datatype }?,
    [ a:defaultValue = "noStitch" ]
    attribute stitchTiles { "stitch" | "noStitch" }?,
    [ a:defaultValue = "turbulence" ]
    attribute type { "fractalNoise" | "turbulence" }?
  a:documentation [
    "\x{a}" ~
    "    feDistantLight: Filter Effect Distant Light Element\x{a}" ~
    "  "
  ]
  SVG.feDistantLight.content = (animate | set)*
  feDistantLight =
    element feDistantLight {
      attlist.feDistantLight, SVG.feDistantLight.content
    }
  attlist.feDistantLight &=
    SVG.Core.attrib,
    attribute azimuth { Number.datatype }?,
    attribute elevation { Number.datatype }?
  a:documentation [
    "\x{a}" ~
    "    fePointLight: Filter Effect Point Light Element\x{a}" ~
    "  "
  ]
  SVG.fePointLight.content = (animate | set)*
  fePointLight =
    element fePointLight {
      attlist.fePointLight, SVG.fePointLight.content
    }
  attlist.fePointLight &=
    SVG.Core.attrib,
    attribute x { Number.datatype }?,
    attribute y { Number.datatype }?,
    attribute z { Number.datatype }?
  a:documentation [
    "\x{a}" ~
    "    feSpotLight: Filter Effect Spot Light Element\x{a}" ~
    "  "
  ]
  SVG.feSpotLight.content = (animate | set)*
  feSpotLight =
    element feSpotLight { attlist.feSpotLight, SVG.feSpotLight.content }
  attlist.feSpotLight &=
    SVG.Core.attrib,
    attribute x { Number.datatype }?,
    attribute y { Number.datatype }?,
    attribute z { Number.datatype }?,
    attribute pointsAtX { Number.datatype }?,
    attribute pointsAtY { Number.datatype }?,
    attribute pointsAtZ { Number.datatype }?,
    attribute specularExponent { Number.datatype }?,
    attribute limitingConeAngle { Number.datatype }?
}