6#ifndef QSK_STIPPLE_METRICS_H
7#define QSK_STIPPLE_METRICS_H
13#include <qnamespace.h>
21 Q_PROPERTY( qreal offset READ offset WRITE setOffset )
22 Q_PROPERTY( QVector< qreal > pattern READ pattern WRITE setPattern )
32 bool isValid()
const noexcept;
33 bool isSolid()
const noexcept;
35 void setOffset( qreal offset )
noexcept;
36 qreal offset()
const noexcept;
38 void setPattern(
const QVector< qreal >& );
39 QVector< qreal > pattern()
const;
47 QskHashValue hash( QskHashValue seed = 0 )
const noexcept;
51 QVector< qreal > m_pattern;
54inline QskStippleMetrics::QskStippleMetrics(
55 const QVector< qreal >& pattern, qreal offset )
57 , m_pattern( pattern )
61inline qreal QskStippleMetrics::offset() const noexcept
66inline QVector< qreal > QskStippleMetrics::pattern()
const
71inline bool QskStippleMetrics::operator==(
74 return ( m_offset == other.m_offset )
75 && ( m_pattern == other.m_pattern );
78inline bool QskStippleMetrics::operator!=(
81 return !( *
this == other );
84inline bool QskStippleMetrics::isValid() const noexcept
86 return !m_pattern.isEmpty();
89inline bool QskStippleMetrics::isSolid() const noexcept
91 return m_pattern.count() == 1;
94QSK_EXPORT QVector< qreal > qskDashPattern( Qt::PenStyle );
96#ifndef QT_NO_DEBUG_STREAM