QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskBoxRenderer.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_BOX_RENDERER_H
7#define QSK_BOX_RENDERER_H
8
9#include "QskGlobal.h"
10
14class QskGradient;
15
16class QQuickWindow;
17class QSGGeometry;
18class QRectF;
19
20class QSK_EXPORT QskBoxRenderer
21{
22 public:
23 QskBoxRenderer( const QQuickWindow* );
25
26 /*
27 Filling the geometry without any color information:
28 see QSGGeometry::defaultAttributes_Point2D()
29
30 - clip nodes
31 - using shaders setting the color information
32 */
33
34 void setBorderLines( const QRectF&,
35 const QskBoxShapeMetrics&, const QskBoxBorderMetrics&, QSGGeometry& );
36
37 void setFillLines( const QRectF&,
38 const QskBoxShapeMetrics&, const QskBoxBorderMetrics&, QSGGeometry& );
39
40 void setFillLines( const QRectF&,
41 const QskBoxShapeMetrics&, QSGGeometry& );
42
43 /*
44 Filling the geometry with color information:
45 see QSGGeometry::defaultAttributes_ColoredPoint2D()
46
47 Usually used in combination with QSGVertexColorMaterial
48 */
49
50 void setColoredBorderLines( const QRectF&,
52 const QskBoxBorderColors&, QSGGeometry& );
53
54 void setColoredFillLines( const QRectF&,
56 const QskGradient&, QSGGeometry& );
57
58 void setColoredBorderAndFillLines( const QRectF&,
60 const QskBoxBorderColors&, const QskGradient&, QSGGeometry& );
61
62 static bool isGradientSupported( const QskGradient& );
63 static QskGradient effectiveGradient( const QskGradient& );
64
65 private:
66 // for adjustments to the target ( f.e devicePixelRatio )
67 const QQuickWindow* m_window;
68};
69
70#endif