Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | namespace QSGSoftwareHelpers { | - |
5 | | - |
6 | typedef QVarLengthArray<QPainter::PixmapFragment, 16> QPixmapFragmentsArray; | - |
7 | | - |
8 | struct QTileRules | - |
9 | { | - |
10 | inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule) | - |
11 | : horizontal(horizontalRule), vertical(verticalRule) {} never executed: end of block | 0 |
12 | inline QTileRules(Qt::TileRule rule = Qt::StretchTile) | - |
13 | : horizontal(rule), vertical(rule) {} never executed: end of block | 0 |
14 | Qt::TileRule horizontal; | - |
15 | Qt::TileRule vertical; | - |
16 | }; | - |
17 | | - |
18 | | - |
19 | | - |
20 | namespace QDrawBorderPixmap | - |
21 | { | - |
22 | enum DrawingHint | - |
23 | { | - |
24 | OpaqueTopLeft = 0x0001, | - |
25 | OpaqueTop = 0x0002, | - |
26 | OpaqueTopRight = 0x0004, | - |
27 | OpaqueLeft = 0x0008, | - |
28 | OpaqueCenter = 0x0010, | - |
29 | OpaqueRight = 0x0020, | - |
30 | OpaqueBottomLeft = 0x0040, | - |
31 | OpaqueBottom = 0x0080, | - |
32 | OpaqueBottomRight = 0x0100, | - |
33 | OpaqueCorners = OpaqueTopLeft | OpaqueTopRight | OpaqueBottomLeft | OpaqueBottomRight, | - |
34 | OpaqueEdges = OpaqueTop | OpaqueLeft | OpaqueRight | OpaqueBottom, | - |
35 | OpaqueFrame = OpaqueCorners | OpaqueEdges, | - |
36 | OpaqueAll = OpaqueCenter | OpaqueFrame | - |
37 | }; | - |
38 | | - |
39 | typedef QFlags<DrawingHint> DrawingHints; | - |
40 | } | - |
41 | | - |
42 | | - |
43 | void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargins &targetMargins, | - |
44 | const QPixmap &pixmap, const QRect &sourceRect,const QMargins &sourceMargins, | - |
45 | const QTileRules &rules, QDrawBorderPixmap::DrawingHints hints); | - |
46 | | - |
47 | } | - |
48 | | - |
49 | class QSGSoftwareInternalImageNode : public QSGInternalImageNode | - |
50 | { | - |
51 | public: | - |
52 | QSGSoftwareInternalImageNode(); | - |
53 | | - |
54 | void setTargetRect(const QRectF &rect) override; | - |
55 | void setInnerTargetRect(const QRectF &rect) override; | - |
56 | void setInnerSourceRect(const QRectF &rect) override; | - |
57 | void setSubSourceRect(const QRectF &rect) override; | - |
58 | void setTexture(QSGTexture *texture) override; | - |
59 | void setMirror(bool mirror) override; | - |
60 | void setMipmapFiltering(QSGTexture::Filtering filtering) override; | - |
61 | void setFiltering(QSGTexture::Filtering filtering) override; | - |
62 | void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) override; | - |
63 | void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) override; | - |
64 | void update() override; | - |
65 | | - |
66 | void preprocess() override; | - |
67 | | - |
68 | void paint(QPainter *painter); | - |
69 | | - |
70 | QRectF rect() const; | - |
71 | | - |
72 | const QPixmap &pixmap() const; | - |
73 | private: | - |
74 | | - |
75 | QRectF m_targetRect; | - |
76 | QRectF m_innerTargetRect; | - |
77 | QRectF m_innerSourceRect; | - |
78 | QRectF m_subSourceRect; | - |
79 | | - |
80 | QSGTexture *m_texture; | - |
81 | QPixmap m_cachedMirroredPixmap; | - |
82 | | - |
83 | bool m_mirror; | - |
84 | bool m_textureIsLayer; | - |
85 | bool m_smooth; | - |
86 | bool m_tileHorizontal; | - |
87 | bool m_tileVertical; | - |
88 | bool m_cachedMirroredPixmapIsDirty; | - |
89 | }; | - |
90 | | - |
91 | | - |
| | |