SvgPath QML Type
A path defined using an SVG path data string. More...
|Import Statement:||import QtQuick.Studio.Components 1.0|
- antialising : bool
- capStyle : ShapePath
- dashOffset : ShapePath
- dashPattern : ShapePath
- fillColor : ShapePath
- gradient : ShapePath
- joinStyle : ShapePath
- path : string
- strokeColor : ShapePath
- strokeStyle : ShapePath
- strokeWidth : ShapePath
The SvgPath type uses an SVG path data string to draw a path as a line.
The capStyle property specifies whether line ends are square or rounded.
The joinStyle property specifies how to connect two path segments. If the path segments enclose areas, they can be painted using either a solid fill color, specified using the fillColor property, or a gradient, defined using one of the ShapeGradient subtypes and set using the gradient property. If both a color and a gradient are specified, the gradient is used.
If the path has curves, it may be appropriate to set the antialiasing property to improve its appearance.
Note: Mixing SvgPath with other types of elements is not always supported. For example, when Shape is backed by
GL_NV_path_rendering, a ShapePath can contain one or more SvgPath elements, or one or more elements of other types, but not both.
antialising : bool
Whether the path should be antialiased.
Antialiasing might require more memory and slow down drawing the type.
capStyle : ShapePath
The cap style of the line.
|A square line end that does not cover the end point of the line.|
|A square line end that covers the end point and extends beyond it by half the line width. This is the default value.|
|A rounded line end.|
See also Qt::PenCapStyle.
dashOffset : ShapePath
The starting point of the dash pattern for the line.
The offset is measured in terms of the units used to specify the dash pattern. For example, a pattern where each stroke is four units long, followed by a gap of two units, will begin with the stroke when drawn as a line. However, if the dash offset is set to 4.0, any line drawn will begin with the gap. Values of the offset up to 4.0 will cause part of the stroke to be drawn first, and values of the offset between 4.0 and 6.0 will cause the line to begin with part of the gap.
The default value is 0.
See also QPen::setDashOffset().
dashPattern : ShapePath
The dash pattern of the line specified as the dashes and the gaps between them.
The dash pattern is specified in units of the pen's width. That is, a dash with the length 5 and width 10 is 50 pixels long.
Each dash is also subject to cap styles, and therefore a dash of 1 with square cap set will extend 0.5 pixels out in each direction resulting in a total width of 2.
The default capStyle is
ShapePath.SquareCap, meaning that a square line end covers the end point and extends beyond it by half the line width.
See also QPen::setDashPattern().
fillColor : ShapePath
The fill color of enclosed path segments.
A gradient for the fill can be specified by using gradient. If both a color and a gradient are specified, the gradient is used.
When set to
transparent, no filling occurs.
The default value is
gradient : ShapePath
The gradient of the fill color.
By default, no gradient is enabled and the value is null. In this case, the fill uses a solid color based on the value of fillColor.
joinStyle : ShapePath
The join style used to connect two path segments.
|The outer edges of the lines are extended to meet at an angle, and this area is filled.|
|The triangular notch between the two lines is filled. This is the default value.|
|A circular arc between the two lines is filled.|
See also Qt::PenJoinStyle.
path : string
The SVG path data string specifying the path.
For more information, see W3C SVG Path Data.
strokeColor : ShapePath
The color of the line.
When set to
transparent, no line is drawn.
The default value is
See also QColor.
strokeStyle : ShapePath
strokeWidth : ShapePath
The width of the line.
When set to a negative value, no line is drawn.
The default value is 1.
Available under certain Qt licenses.
Find out more.