make it easy for when source == dest, which is a common case
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=863721
This commit is contained in:
parent
cd7e48a164
commit
d3bff41f31
@ -379,7 +379,7 @@ void PanelSvg::paintPanel(QPainter* painter, const QRectF& target, const QRectF&
|
||||
Q_ASSERT(panel->cachedBackground);
|
||||
}
|
||||
|
||||
painter->drawPixmap(target, *(panel->cachedBackground), source);
|
||||
painter->drawPixmap(target, *(panel->cachedBackground), source.isValid() ? source : target);
|
||||
}
|
||||
|
||||
void PanelSvg::paintPanel(QPainter* painter, const QPointF& pos)
|
||||
|
@ -229,7 +229,8 @@ class PLASMA_EXPORT PanelSvg : public Svg
|
||||
* @arg target the target rectangle on the paint device
|
||||
* @arg source the portion rectangle of the source image
|
||||
*/
|
||||
Q_INVOKABLE void paintPanel(QPainter* painter, const QRectF& target, const QRectF& source);
|
||||
Q_INVOKABLE void paintPanel(QPainter* painter, const QRectF& target,
|
||||
const QRectF& source = QRectF());
|
||||
|
||||
/**
|
||||
* Paints the loaded SVG with the elements that represents the border
|
||||
|
Loading…
Reference in New Issue
Block a user