effects/colorpicker: Factor out effects->renderTargetRect() constant
This commit is contained in:
parent
90688b11f6
commit
2fa4a4c4e9
1 changed files with 2 additions and 2 deletions
|
@ -54,9 +54,9 @@ void ColorPickerEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaint
|
|||
{
|
||||
effects->paintScreen(mask, region, data);
|
||||
|
||||
if (m_scheduledPosition != QPoint(-1, -1) && effects->renderTargetRect().contains(m_scheduledPosition)) {
|
||||
const QRect geo = effects->renderTargetRect();
|
||||
if (m_scheduledPosition != QPoint(-1, -1) && geo.contains(m_scheduledPosition)) {
|
||||
uint8_t data[4];
|
||||
const QRect geo = effects->renderTargetRect();
|
||||
const QPoint screenPosition(m_scheduledPosition.x() - geo.x(), m_scheduledPosition.y() - geo.y());
|
||||
const QPoint texturePosition(screenPosition.x() * effects->renderTargetScale(), (geo.height() - screenPosition.y()) * effects->renderTargetScale());
|
||||
|
||||
|
|
Loading…
Reference in a new issue