Don't crop away the decoration shadows in the lanczos filter.
svn path=/trunk/KDE/kdebase/workspace/; revision=1160557
This commit is contained in:
parent
37be26fdf6
commit
f359d19a90
1 changed files with 22 additions and 8 deletions
|
@ -184,19 +184,33 @@ void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region,
|
||||||
init();
|
init();
|
||||||
if ( m_shader )
|
if ( m_shader )
|
||||||
{
|
{
|
||||||
int tx = data.xTranslate + w->x();
|
double left = 0;
|
||||||
int ty = data.yTranslate + w->y();
|
double top = 0;
|
||||||
int tw = w->width()*data.xScale;
|
double right = w->width();
|
||||||
int th = w->height()*data.yScale;
|
double bottom = w->height();
|
||||||
|
foreach( const WindowQuad& quad, data.quads )
|
||||||
|
{
|
||||||
|
// we need this loop to include the decoration padding
|
||||||
|
left = qMin(left, quad.left());
|
||||||
|
top = qMin(top, quad.top());
|
||||||
|
right = qMax(right, quad.right());
|
||||||
|
bottom = qMax(bottom, quad.bottom());
|
||||||
|
}
|
||||||
|
double width = right - left;
|
||||||
|
double height = bottom - top;
|
||||||
|
int tx = data.xTranslate + w->x() + left*data.xScale;
|
||||||
|
int ty = data.yTranslate + w->y() + top*data.yScale;
|
||||||
|
int tw = width*data.xScale;
|
||||||
|
int th = height*data.yScale;
|
||||||
|
|
||||||
int sw = w->width();
|
int sw = width;
|
||||||
int sh = w->height();
|
int sh = height;
|
||||||
|
|
||||||
WindowPaintData thumbData = data;
|
WindowPaintData thumbData = data;
|
||||||
thumbData.xScale = 1.0;
|
thumbData.xScale = 1.0;
|
||||||
thumbData.yScale = 1.0;
|
thumbData.yScale = 1.0;
|
||||||
thumbData.xTranslate = -w->x();
|
thumbData.xTranslate = -w->x() - left;
|
||||||
thumbData.yTranslate = -w->y();
|
thumbData.yTranslate = -w->y() - top;
|
||||||
|
|
||||||
// Bind the offscreen FBO and draw the window on it unscaled
|
// Bind the offscreen FBO and draw the window on it unscaled
|
||||||
updateOffscreenSurfaces();
|
updateOffscreenSurfaces();
|
||||||
|
|
Loading…
Reference in a new issue