A Geometric effect object that transforms the symbolization of a line using a pattern of dashes and gaps. More...
Header: | #include <DashGeometricEffect.h> |
Since: | Esri::ArcGISRuntime 100.5 |
Inherits: | Esri::ArcGISRuntime::GeometricEffect |
Public Functions
DashGeometricEffect(QObject *parent = nullptr) | |
DashGeometricEffect(const QList<double> &dashTemplate, QObject *parent = nullptr) | |
virtual | ~DashGeometricEffect() override |
QList<double> | dashTemplate() const |
void | setDashTemplate(const QList<double> &dashTemplate) |
Detailed Description
Transforms the representation of a line using a pattern of dashes and gaps. Dashes are the symbolized portion of the stroke and gaps are the unsymbolized portion. A QList of dash and gap distances (DIP values greater than 0) provides a template to be repeated throughout the line. A basic template consists of two distance values: the first defines the length of each dash and the second defines the length of each gap. More complex effects can be created by defining a template of multiple dashes and gaps. Template values are read as dash distance followed by gap distance throughout the pattern. Templates that contain an odd number of values will maintain the dash-gap pattern by restarting at the beginning of the template. A template of '3 2 1', for example, will be rendered as '3(dash) 2(gap) 1(dash) 3(gap) 2(dash) 1(gap) ...'. The default template is an empty QList, which renders a solid line.
Member Function Documentation
[explicit]
DashGeometricEffect::DashGeometricEffect (QObject *parent = nullptr)
Creates a dash geometric effect.
- parent - The optional parent QObject.
Transforms the representation of a line using a pattern of dashes and gaps. Dashes are the symbolized portion of the stroke and gaps are the unsymbolized portion. The default template is an empty QList, which renders a solid line.
[explicit]
DashGeometricEffect::DashGeometricEffect (const QList<double> &dashTemplate , QObject *parent = nullptr)
Creates a dash geometric effect using the provided template to define dashes and gaps.
- dashTemplate - A QList of doubles defining dash and gap distances (DIPs) for the geometric effect.
- parent - The optional parent QObject.
Transforms the representation of a line using a pattern of dashes and gaps. Dashes are the symbolized portion of the stroke and gaps are the unsymbolized portion. A QList of dash and gap distances (non-negative DIP values) provides a template to be repeated throughout the line. A basic template consists of two distance values: the first defines the length of each dash and the second defines the length of each gap. More complex effects can be created by defining a template of multiple dashes and gaps. Template values are read as dash distance followed by gap distance throughout the pattern. Templates that contain an odd number of values will maintain the dash-gap pattern by restarting at the beginning of the template. A template of '3 2 1', for example will be rendered as '3(dash) 2(gap) 1(dash) 3(gap) 2(dash) 1(gap) ...'. The default template is an empty QList, which renders a solid line. If any value in the dash pattern is negative, the function will emit an error.
[override virtual]
DashGeometricEffect::~DashGeometricEffect ()
Destructor.
QList<double> DashGeometricEffect::dashTemplate () const
Returns the template that defines dashes and gaps for the geometric effect.
Transforms the representation of a line using a pattern of dashes and gaps. Dashes are the symbolized portion of the stroke and gaps are the unsymbolized portion. A QList of dash and gap distances (non-negative DIP values) provides a template to be repeated throughout the line. A basic template consists of two distance values: the first defines the length of each dash and the second defines the length of each gap. More complex effects can be created by defining a template of multiple dashes and gaps. Template values are read as dash distance followed by gap distance throughout the pattern. Templates that contain an odd number of values will maintain the dash-gap pattern by restarting at the beginning of the template. A template of '3 2 1', for example will be rendered as '3(dash) 2(gap) 1(dash) 3(gap) 2(dash) 1(gap) ...'. The default template is an empty QList, which renders a solid line. Adding any negative values to the collection returned by this function will emit an error, as only values >= 0 are allowed in dash patterns.
See also setDashTemplate().
void DashGeometricEffect::setDashTemplate (const QList<double> &dashTemplate )
Sets the template that defines dashes and gaps for the geometric effect.
- dashTemplate - QList of DIP values that define the dash-gap pattern.
See also dashTemplate().