Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
svgextensions.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page svgextensions.html
6
\title Extended Features
7
\brief Extended Features (relative to 1.2 Tiny) of the Qt SVG module
8
9
The Qt SVG module supports the \l{SVG 1.2 Tiny Static Features}
10
{static features} of \l{http://www.w3.org/TR/SVGMobile12}{SVG 1.2 Tiny}.
11
12
The module also supports a few extra features which might be useful.
13
The \l QSvgRenderer parses all features (including the extra feature
14
set) by default. You can instruct the render to ignore these extra
15
features by passing the QtSvg::Tiny12FeaturesOnly flag in
16
\l QSvgRenderer::setOptions().
17
18
19
\section1 Extended features
20
21
Qt supports the following extended elements and related attributes as of
22
Qt 6.7:
23
24
\list
25
\li mask
26
\l{https://www.w3.org/TR/SVG11/masking.html#MaskElement}{SVG 1.1}
27
\li symbol
28
\l{https://www.w3.org/TR/SVG11/struct.html#SymbolElement}{SVG 1.1} and
29
\l{https://www.w3.org/TR/SVG2/struct.html#SymbolElement}{SVG 2}
30
\li marker
31
\l{https://www.w3.org/TR/SVG11/painting.html#MarkerElement}{SVG 1.1}
32
\li pattern
33
\l{https://www.w3.org/TR/SVG11/pservers.html#PatternElement}{SVG 1.1}
34
\li filter
35
\l{https://www.w3.org/TR/SVG11/filters.html#FilterElement}{SVG 1.1}
36
\li feColorMatrix
37
\l{https://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement}
38
{SVG 1.1}
39
\li feComposite
40
\l{https://www.w3.org/TR/SVG11/filters.html#feCompositeElement}
41
{SVG 1.1}
42
\li feFlood
43
\l{https://www.w3.org/TR/SVG11/filters.html#feFloodElement}{SVG 1.1}
44
\li feGaussianBlur
45
\l{https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement}
46
{SVG 1.1}
47
\li feOffset
48
\l{https://www.w3.org/TR/SVG11/filters.html#feOffsetElement}{SVG 1.1}
49
\li feMerge
50
\l{https://www.w3.org/TR/SVG11/filters.html#feMergeElement}{SVG 1.1}
51
\endlist
52
53
54
\section1 Masking
55
56
Masking is supported in the form of the \c{<mask>} element and the mask
57
attribute.
58
59
\note <clipPath> is not supported.
60
61
\section2 <mask>
62
63
The following attributes of the \c{<mask>} element are supported:
64
65
\list
66
\li \c{x}
67
\li \c{y}
68
\li \c{width}
69
\li \c{height}
70
\li \c{maskUnits}
71
\li \c{maskContentUnits}
72
\endlist
73
74
The \c{mask} attribute is supported for all graphical and structural SVG
75
elements.
76
77
78
\section1 Symbols, Markers and Patterns
79
80
\section2 <symbol>
81
82
The following attributes of the \c{<symbol>} element are supported:
83
84
\list
85
\li \c{x} (from SVG 2)
86
\li \c{y} (from SVG 2)
87
\li \c{width} (from SVG 2)
88
\li \c{height} (from SVG 2)
89
\li \c{preserveAspectRatio}
90
\li \c{viewBox}
91
\endlist
92
93
94
\section2 <marker>
95
96
The following attributes of the \c{<marker>} element are supported:
97
98
\list
99
\li \c{markerUnits}
100
\li \c{refX}
101
\li \c{refY}
102
\li \c{markerWidth}
103
\li \c{markerHeight}
104
\li \c{orient}
105
\li \c{preserveAspectRatio}
106
\li \c{viewBox}
107
\endlist
108
109
The attributes
110
111
\list
112
\li \c{marker-start}
113
\li \c{marker-mid}
114
\li \c{marker-end}
115
\endlist
116
117
are supported for \c{<path>}, \c{<line>}, \c{<polyline>} and \c{<polygon>}.
118
119
120
\section2 <pattern>
121
122
The following attributes are supported:
123
\list
124
\li \c{x}
125
\li \c{y}
126
\li \c{width}
127
\li \c{height}
128
\li \c{patternUnits}
129
\li \c{patternContentUnits}
130
\li \c{patternTransform}
131
\li \c{viewBox}
132
\endlist
133
134
The following attributes are not supported:
135
\list
136
\li \c{preserveAspectRatio}
137
\li \c{xlink:href}
138
\endlist
139
140
141
\section1 Filter
142
143
Filters in SVG documents apply graphic effects on an element, parts of an
144
element, or the background below the element. Qt supports filter effects
145
applied to the whole element.
146
Qt does not support applying filters on only the element's fill or stroke
147
(\c FillPaint and \c StrokePaint), or its background (\c BackgroundImage
148
and \c BackgroundAlpha).
149
150
\section2 <filter>
151
152
The following attributes of the \c{<filter>} element are supported:
153
154
\list
155
\li \c{x}
156
\li \c{y}
157
\li \c{width}
158
\li \c{height}
159
\li \c{filterUnits}
160
\li \c{primitiveUnits}
161
\endlist
162
163
The following attributes of the \c{<filter>} element are not supported:
164
165
\list
166
\li \c{filterRes}
167
\li \c{xlink:href}
168
\endlist
169
170
The \c{filter} attribute is supported for all graphical and structural SVG
171
elements.
172
173
174
\section2 Filter primitives
175
176
The filter element contains various filter primitives. Qt supports the most
177
important filter primitives (see below).
178
179
All filter primitives share common set of attributes. The following are
180
supported:
181
182
\list
183
\li \c{x}
184
\li \c{y}
185
\li \c{width}
186
\li \c{height}
187
\li \c{in} (Supported are \c{SourceGraphic}, \c{SourceAlpha}, and all
188
references to filters)
189
\li \c{result}
190
\endlist
191
192
The following attributes are not supported:
193
194
\list
195
\li \c{in} (Not supported are \c{BackgroundImage}, \c{BackgroundAlpha},
196
\c{FillPaint}, and \c{StrokePaint})
197
\endlist
198
199
\section2 <feColorMatrix>
200
201
The following attributes are supported:
202
203
\list
204
\li \c{type}
205
\li \c{values}
206
\endlist
207
208
\section2 <feGaussianBlur>
209
210
The following attributes are supported:
211
212
\list
213
\li \c{stdDeviation}
214
\endlist
215
216
The following attributes are not supported:
217
218
\list
219
\li \c{edgeMode} (the implementation matches \c{none})
220
\endlist
221
222
\section2 <feOffset>
223
224
The following attributes are supported:
225
226
\list
227
\li \c{dx}
228
\li \c{dy}
229
\endlist
230
231
\section2 <feMerge> and <feMergeNode>
232
233
No additional attributes.
234
235
\section2 <feComposite>
236
237
The following attributes are supported:
238
239
\list
240
\li \c{operator}
241
\li \c{k1}
242
\li \c{k2}
243
\li \c{k3}
244
\li \c{k4}
245
\endlist
246
247
\section2 <feFlood>
248
249
The following attributes are supported:
250
251
\list
252
\li \c{flodd-color}
253
\li \c{flood-opacity}
254
\endlist
255
256
*/
qtsvg
src
svg
doc
src
svgextensions.qdoc
Generated on
for Qt by
1.14.0