68 QCPScatterStyle(ScatterShape shape,
const QColor &color,
const QColor &fill,
double size);
69 QCPScatterStyle(ScatterShape shape,
const QPen &pen,
const QBrush &brush,
double size);
71 QCPScatterStyle(
const QPainterPath &customPath,
const QPen &pen,
const QBrush &brush=Qt::NoBrush,
double size=6);
74 double size()
const {
return mSize; }
75 ScatterShape shape()
const {
return mShape; }
76 QPen pen()
const {
return mPen; }
77 QBrush brush()
const {
return mBrush; }
78 QPixmap pixmap()
const {
return mPixmap; }
79 QPainterPath customPath()
const {
return mCustomPath; }
82 void setSize(
double size);
83 void setShape(ScatterShape shape);
84 void setPen(
const QPen &pen);
85 void setBrush(
const QBrush &brush);
86 void setPixmap(
const QPixmap &pixmap);
87 void setCustomPath(
const QPainterPath &customPath);
90 bool isNone()
const {
return mShape == ssNone; }
92 void applyTo(
QCPPainter *painter,
const QPen &defaultPen)
const;
93 void drawShape(
QCPPainter *painter, QPointF pos)
const;
94 void drawShape(
QCPPainter *painter,
double x,
double y)
const;
103 QPainterPath mCustomPath;
122 ,pmNonCosmetic = 0x04
124 Q_FLAGS(PainterMode PainterModes)
125 Q_DECLARE_FLAGS(PainterModes, PainterMode)
128 QCPPainter(QPaintDevice *device);
132 bool antialiasing()
const {
return testRenderHint(QPainter::Antialiasing); }
133 PainterModes modes()
const {
return mModes; }
136 void setAntialiasing(
bool enabled);
137 void setMode(PainterMode mode,
bool enabled=
true);
138 void setModes(PainterModes modes);
141 bool begin(QPaintDevice *device);
142 void setPen(
const QPen &pen);
143 void setPen(
const QColor &color);
144 void setPen(Qt::PenStyle penStyle);
145 void drawLine(
const QLineF &line);
146 void drawLine(
const QPointF &p1,
const QPointF &p2) {drawLine(QLineF(p1, p2));}
151 void makeNonCosmetic();
156 bool mIsAntialiasing;
159 QStack<bool> mAntialiasingStack;
161 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPPainter::PainterModes)
163 #endif // QCP_PAINTER_H