首次提交
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "effect.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
|
||||
void Wave_effect::draw(QPainter* painter) {
|
||||
auto r = boundingRect();
|
||||
qDebug() << r;
|
||||
|
||||
//r.adjusted(-10, -10, 10, 10);
|
||||
|
||||
//painter->setBrush(Qt::NoBrush);
|
||||
|
||||
|
||||
painter->fillRect(r, Qt::yellow);
|
||||
|
||||
drawSource(painter);
|
||||
}
|
||||
|
||||
QRectF Wave_effect::boundingRectFor(const QRectF& sourceRect) const {
|
||||
|
||||
auto r = QGraphicsEffect::boundingRectFor(sourceRect);
|
||||
qDebug() << "Wave_effect::boundingRectFor:" << sourceRect << " " << r;
|
||||
return r.adjusted(-10, -10, 10, 10);
|
||||
//return QGraphicsEffect::boundingRectFor(sourceRect);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user