The Qt SVG module supports the static features of SVG 1.2 Tiny .
The module also supports a few extra features which might be useful. The QSvgRenderer parses all features (including the extra feature set) by default. You can instruct the render to ignore these extra features by passing the QtSvg::Tiny12FeaturesOnly flag in QSvgRenderer::setOptions ().
Qt supports the following extended elements and related attributes as of Qt 6.7:
Masking is supported in the form of the
<mask>
element and the mask attribute.
注意: <clipPath> is not supported.
The following attributes of the
<mask>
element are supported:
x
y
width
height
maskUnits
maskContentUnits
The
mask
attribute is supported for all graphical and structural SVG elements.
The following attributes of the
<symbol>
element are supported:
x
(from SVG 2)
y
(from SVG 2)
width
(from SVG 2)
height
(from SVG 2)
preserveAspectRatio
viewBox
The following attributes of the
<marker>
element are supported:
markerUnits
refX
refY
markerWidth
markerHeight
orient
preserveAspectRatio
viewBox
The attributes
marker-start
marker-mid
marker-end
are supported for
<path>
,
<line>
,
<polyline>
and
<polygon>
.
The following attributes are supported:
x
y
width
height
patternUnits
patternContentUnits
patternTransform
viewBox
The following attributes are not supported:
preserveAspectRatio
xlink:href
Filters in SVG documents apply graphic effects on an element, parts of an element, or the background below the element. Qt supports filter effects applied to the whole element. Qt does not support applying filters on only the element's fill or stroke (
FillPaint
and
StrokePaint
), or its background (
BackgroundImage
and
BackgroundAlpha
).
The following attributes of the
<filter>
element are supported:
x
y
width
height
filterUnits
primitiveUnits
The following attributes of the
<filter>
element are not supported:
filterRes
xlink:href
The
filter
attribute is supported for all graphical and structural SVG elements.
The filter element contains various filter primitives. Qt supports the most important filter primitives (see below).
All filter primitives share common set of attributes. The following are supported:
x
y
width
height
in
(Supported are
SourceGraphic
,
SourceAlpha
, and all references to filters)
result
The following attributes are not supported:
in
(Not supported are
BackgroundImage
,
BackgroundAlpha
,
FillPaint
,和
StrokePaint
)
The following attributes are supported:
type
值
The following attributes are supported:
stdDeviation
The following attributes are not supported:
edgeMode
(the implementation matches
none
)
The following attributes are supported:
dx
dy
No additional attributes.
The following attributes are supported:
operator
k1
k2
k3
k4
The following attributes are supported:
flodd-color
flood-opacity