6#include "QskTextColors.h"
7#include "QskRgbValue.h"
9#include <qhashfunctions.h>
12QskHashValue QskTextColors::hash( QskHashValue seed )
const noexcept
14 const QRgb rgb[] = { textColor.rgba(), styleColor.rgba(), linkColor.rgba() };
15 return qHashBits( rgb,
sizeof( rgb ), seed );
22 colors.textColor = QskRgb::interpolated( textColor, to.textColor, ratio );
23 colors.styleColor = QskRgb::interpolated( styleColor, to.styleColor, ratio );
24 colors.linkColor = QskRgb::interpolated( linkColor, to.linkColor, ratio );
29QVariant QskTextColors::interpolate(
32 return QVariant::fromValue( from.interpolated( to, ratio ) );
35#ifndef QT_NO_DEBUG_STREAM
39static inline void qskDebugColor( QDebug debug,
const QColor& c )
41 debug <<
'(' << c.red() <<
',' << c.green() <<
','
42 << c.blue() <<
',' << c.alpha() <<
')';
47 QDebugStateSaver saver( debug );
50 debug <<
"TextColors" <<
'(';
53 qskDebugColor( debug, colors.textColor );
56 qskDebugColor( debug, colors.styleColor );
59 qskDebugColor( debug, colors.linkColor );