From 70f4d2828542d607c17384f5b4c1ddcb08321ca2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 14 Nov 2022 09:01:07 +0100 Subject: [PATCH] using QRgb instead of QColor --- src/nodes/QskBoxRendererColorMap.h | 8 ++++---- src/nodes/QskBoxRendererEllipse.cpp | 2 +- src/nodes/QskBoxRendererRect.cpp | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/nodes/QskBoxRendererColorMap.h b/src/nodes/QskBoxRendererColorMap.h index b0f994df..cba59b20 100644 --- a/src/nodes/QskBoxRendererColorMap.h +++ b/src/nodes/QskBoxRendererColorMap.h @@ -155,13 +155,13 @@ namespace QskVertex { if ( stops.first().position() > 0.0 ) { - m_color1 = m_color2 = stops[ 0 ].color(); + m_color1 = m_color2 = stops[ 0 ].rgb(); m_index = 0; } else { - m_color1 = stops[ 0 ].color(); - m_color2 = stops[ 1 ].color(); + m_color1 = stops[ 0 ].rgb(); + m_color2 = stops[ 1 ].rgb(); m_index = 1; } @@ -206,7 +206,7 @@ namespace QskVertex { const auto& stop = m_stops[ m_index ]; - m_color2 = stop.color(); + m_color2 = stop.rgb(); m_valueStep2 = valueAt( stop.position() ); } diff --git a/src/nodes/QskBoxRendererEllipse.cpp b/src/nodes/QskBoxRendererEllipse.cpp index 3ee1daf5..dc473ae9 100644 --- a/src/nodes/QskBoxRendererEllipse.cpp +++ b/src/nodes/QskBoxRendererEllipse.cpp @@ -558,7 +558,7 @@ namespace const float x2 = x12 + pos * dx2; const float y2 = y12 + pos * dy2; - line->setLine( x1, y1, x2, y2, stop.color() ); + line->setLine( x1, y1, x2, y2, stop.rgb() ); } void addAdditionalLines( diff --git a/src/nodes/QskBoxRendererRect.cpp b/src/nodes/QskBoxRendererRect.cpp index 19deef90..567d8737 100644 --- a/src/nodes/QskBoxRendererRect.cpp +++ b/src/nodes/QskBoxRendererRect.cpp @@ -425,7 +425,7 @@ static inline void qskCreateBorder( if ( stops.first().position() > 0.0 ) { ( line++ )->setLine( in.right, in.bottom, - out.right, out.bottom, stops.first().color() ); + out.right, out.bottom, stops.first().rgb() ); } for( const auto& stop : stops ) @@ -433,13 +433,13 @@ static inline void qskCreateBorder( const qreal x1 = in.right - stop.position() * dx1; const qreal x2 = out.right - stop.position() * dx2; - ( line++ )->setLine( x1, in.bottom, x2, out.bottom, stop.color() ); + ( line++ )->setLine( x1, in.bottom, x2, out.bottom, stop.rgb() ); } if ( stops.last().position() < 1.0 ) { ( line++ )->setLine( in.left, in.bottom, - out.left, out.bottom, stops.last().color() ); + out.left, out.bottom, stops.last().rgb() ); } } @@ -449,7 +449,7 @@ static inline void qskCreateBorder( if ( stops.first().position() > 0.0 ) { ( line++ )->setLine( in.left, in.bottom, - out.left, out.bottom, stops.first().color() ); + out.left, out.bottom, stops.first().rgb() ); } for( const auto& stop : stops ) @@ -457,13 +457,13 @@ static inline void qskCreateBorder( const qreal y1 = in.bottom + stop.position() * dy1; const qreal y2 = out.bottom + stop.position() * dy2; - ( line++ )->setLine( in.left, y1, out.left, y2, stop.color() ); + ( line++ )->setLine( in.left, y1, out.left, y2, stop.rgb() ); } if ( stops.last().position() < 1.0 ) { ( line++ )->setLine( in.left, in.top, - out.left, out.top, stops.last().color() ); + out.left, out.top, stops.last().rgb() ); } } @@ -473,7 +473,7 @@ static inline void qskCreateBorder( if ( stops.first().position() > 0.0 ) { ( line++ )->setLine( in.left, in.top, - out.left, out.top, stops.first().color() ); + out.left, out.top, stops.first().rgb() ); } for( const auto& stop : stops ) @@ -481,13 +481,13 @@ static inline void qskCreateBorder( const qreal x1 = in.left + stop.position() * dx1; const qreal x2 = out.left + stop.position() * dx2; - ( line++ )->setLine( x1, in.top, x2, out.top, stop.color() ); + ( line++ )->setLine( x1, in.top, x2, out.top, stop.rgb() ); } if ( stops.last().position() < 1.0 ) { ( line++ )->setLine( in.right, in.top, - out.right, out.top, stops.last().color() ); + out.right, out.top, stops.last().rgb() ); } } @@ -497,7 +497,7 @@ static inline void qskCreateBorder( if ( stops.first().position() > 0.0 ) { ( line++ )->setLine( in.right, in.top, - out.right, out.top, stops.first().color() ); + out.right, out.top, stops.first().rgb() ); } for( const auto& stop : stops ) @@ -505,13 +505,13 @@ static inline void qskCreateBorder( const qreal y1 = in.bottom + ( 1 - stop.position() ) * dy1; const qreal y2 = out.bottom + ( 1 - stop.position() ) * dy2; - ( line++ )->setLine( in.right, y1, out.right, y2, stop.color() ); + ( line++ )->setLine( in.right, y1, out.right, y2, stop.rgb() ); } if ( stops.last().position() < 1.0 ) { ( line++ )->setLine( in.right, in.bottom, - out.right, out.bottom, stops.last().color() ); + out.right, out.bottom, stops.last().rgb() ); } } }