2017-07-21 16:21:34 +00:00
|
|
|
/******************************************************************************
|
2024-01-17 13:31:45 +00:00
|
|
|
* QSkinny - Copyright (C) The authors
|
2023-04-06 07:23:37 +00:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2017-07-21 16:21:34 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2024-12-02 10:03:37 +00:00
|
|
|
#ifndef QSK_CLIP_NODE_H
|
|
|
|
|
#define QSK_CLIP_NODE_H
|
2017-07-21 16:21:34 +00:00
|
|
|
|
|
|
|
|
#include "QskGlobal.h"
|
2018-07-19 12:10:48 +00:00
|
|
|
#include <qsgnode.h>
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2017-10-17 15:29:02 +00:00
|
|
|
class QskBoxShapeMetrics;
|
|
|
|
|
class QskBoxBorderMetrics;
|
|
|
|
|
|
2024-11-07 10:21:45 +00:00
|
|
|
class QQuickWindow;
|
|
|
|
|
|
2024-12-02 10:03:37 +00:00
|
|
|
class QSK_EXPORT QskClipNode : public QSGClipNode
|
2017-07-21 16:21:34 +00:00
|
|
|
{
|
2024-12-02 10:03:37 +00:00
|
|
|
using Inherited = QSGClipNode;
|
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2024-12-02 10:03:37 +00:00
|
|
|
QskClipNode();
|
|
|
|
|
~QskClipNode() override;
|
|
|
|
|
|
|
|
|
|
void setRect( const QRectF& );
|
|
|
|
|
void setRegion( const QRectF&, const QRectF& excludedRect );
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2024-11-07 10:21:45 +00:00
|
|
|
void setBox( const QQuickWindow*, const QRectF&,
|
2017-10-17 15:29:02 +00:00
|
|
|
const QskBoxShapeMetrics&, const QskBoxBorderMetrics& );
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2024-12-02 10:03:37 +00:00
|
|
|
QRectF boundingRectangle() const;
|
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
private:
|
2024-12-02 10:03:37 +00:00
|
|
|
void reset();
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2024-12-02 10:03:37 +00:00
|
|
|
void setIsRectangular( bool ) = delete;
|
|
|
|
|
void setClipRect( const QRectF& ) = delete;
|
|
|
|
|
QRectF clipRect() const = delete;
|
|
|
|
|
|
|
|
|
|
QskHashValue m_hash;
|
2017-07-21 16:21:34 +00:00
|
|
|
QSGGeometry m_geometry;
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-02 10:03:37 +00:00
|
|
|
inline QRectF QskClipNode::boundingRectangle() const
|
|
|
|
|
{
|
|
|
|
|
return Inherited::clipRect();
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-21 16:21:34 +00:00
|
|
|
#endif
|