diff --git a/playground/shapes/ShapeItem.cpp b/playground/shapes/ShapeItem.cpp index 21a1a02d..32c58ec9 100644 --- a/playground/shapes/ShapeItem.cpp +++ b/playground/shapes/ShapeItem.cpp @@ -14,6 +14,8 @@ #include #include +#define STROKE_ADJUSTMENT 0 + static inline QTransform transformForRects( const QRectF& r1, const QRectF& r2 ) { return QTransform::fromTranslate( -r1.x(), -r1.y() ) @@ -21,6 +23,8 @@ static inline QTransform transformForRects( const QRectF& r1, const QRectF& r2 ) * QTransform::fromTranslate( r2.x(), r2.y() ); } +#if STROKE_ADJUSTMENT + static inline qreal effectiveStrokeWidth( const Stroke& stroke, const QRectF& r1, const QRectF& r2 ) { @@ -37,6 +41,8 @@ static inline qreal effectiveStrokeWidth( return width; } +#endif + class ShapeItem::PrivateData { public: @@ -167,7 +173,8 @@ void ShapeItem::updateNode( QSGNode* parentNode ) } auto fillRect = rect; -#if 0 + +#if STROKE_ADJUSTMENT /* when the stroke is not opaque ( transparent color or dashed ) we would see, that the filling is not inside. But simply adjusting