My Project
qpen.h
1 #pragma once
2 #include "qbrush.h"
3 
4 namespace ParaEngine
5 {
6  class QBrush;
7 
13  class QPen
14  {
15  public:
16  QPen();
17  QPen(PenStyle);
18  QPen(const Color &color);
19  QPen(const QBrush &brush, float width, PenStyle s = SolidLine,
20  PenCapStyle c = SquareCap, PenJoinStyle j = BevelJoin);
21  ~QPen();
22 
23  PenStyle style() const;
24  void setStyle(PenStyle);
25 
26  std::vector<float> dashPattern() const;
27  void setDashPattern(const std::vector<float> &pattern);
28 
29  float dashOffset() const;
30  void setDashOffset(float doffset);
31 
32  float miterLimit() const;
33  void setMiterLimit(float limit);
34 
35  float widthF() const;
36  void setWidthF(float width);
37 
38  int width() const;
39  void setWidth(int width);
40 
41  Color color() const;
42  void setColor(const Color &color);
43 
44  QBrush brush() const;
45  void setBrush(const QBrush &brush);
46 
47  bool isSolid() const;
48 
49  PenCapStyle capStyle() const;
50  void setCapStyle(PenCapStyle pcs);
51 
52  PenJoinStyle joinStyle() const;
53  void setJoinStyle(PenJoinStyle pcs);
54 
55  bool isCosmetic() const { return true; };
56  void setCosmetic(bool cosmetic) {};
57 
58  bool operator==(const QPen &p) const;
59  inline bool operator!=(const QPen &p) const { return !(operator==(p)); }
60 
61  private:
62  float m_width;
63  QBrush m_brush;
64  PenStyle m_style;
65  PenCapStyle m_capStyle;
66  PenJoinStyle m_joinStyle;
67  mutable std::vector<float> m_dashPattern;
68  float m_dashOffset;
69  float m_miterLimit;
70  };
71 }
The QPen class defines how a CPainter should draw lines and outlines of shapes.
Definition: qpen.h:13
different physics engine has different winding order.
Definition: EventBinding.h:32
The QBrush class defines the fill pattern of shapes drawn by CPainter.
Definition: qbrush.h:11
Definition: ParaColor.h:275