My Project
qbrush.h
1 #pragma once
2 #include "qmatrix.h"
3 #include "qtransform.h"
4 #include "TextureEntity.h"
5 
6 namespace ParaEngine
7 {
8  class QBrushData;
9 
11  class QBrush
12  {
13  public:
14  QBrush();
15  QBrush(BrushStyle bs);
16  QBrush(const Color &color, BrushStyle bs = SolidPattern);
17  QBrush(const Color &color, TextureEntity* pTexture);
18  QBrush(TextureEntity* pTexture);
19  ~QBrush();
20 
21  inline BrushStyle style() const;
22  void setStyle(BrushStyle);
23 
24  inline const QMatrix &matrix() const;
25  void setMatrix(const QMatrix &mat);
26 
27  inline QTransform transform() const;
28  void setTransform(const QTransform &);
29 
30  TextureEntity* texture() const;
31  void setTexture(TextureEntity* pTexture);
32 
33  inline const Color &color() const;
34  void setColor(const Color &color);
35 
36  bool isOpaque() const;
37 
38  bool operator==(const QBrush &b) const;
39  inline bool operator!=(const QBrush &b) const { return !(operator==(b)); }
40 
41  private:
42  void init(const Color &color, BrushStyle bs);
43 
44  BrushStyle m_style;
45  Color m_color;
46  QTransform m_transform;
47  asset_ptr<TextureEntity> m_pTexture;
48  };
49 
50  inline BrushStyle QBrush::style() const { return m_style; }
51  inline const Color &QBrush::color() const { return m_color; }
52  inline const QMatrix &QBrush::matrix() const { return m_transform.toAffine(); }
53  inline QTransform QBrush::transform() const { return m_transform; }
54 }
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: qtransform.h:14
The QBrush class defines the fill pattern of shapes drawn by CPainter.
Definition: qbrush.h:11
Definition: qmatrix.h:12
Definition: ParaColor.h:275