r21205 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 17 13:46:19 UTC 2016
Author: jghali
Date: Sun Apr 17 13:46:19 2016
New Revision: 21205
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21205
Log:
fix potential inconsistency between text frame and its drop shadow
Modified:
trunk/Scribus/scribus/pageitem.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21205&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sun Apr 17 13:46:19 2016
@@ -2347,20 +2347,18 @@
p->beginLayer(1.0 - m_softShadowOpacity, m_softShadowBlendMode);
if (!hasFill())
{
- bool isEmbedded_Old = isEmbedded;
- bool hasSoftShadow_Old = m_hasSoftShadow;
+ double xOffset = isEmbedded ? m_softShadowXOffset : (m_softShadowXOffset - m_xPos);
+ double yOffset = isEmbedded ? m_softShadowYOffset : (m_softShadowYOffset - m_yPos);
double fillTrans_Old = fillTransparency();
double lineTrans_Old = lineTransparency();
- bool shadow_Old = hasSoftShadow();
+ bool hasSoftShadow_Old = hasSoftShadow();
double rotation_Old = m_rotation;
fillTransparencyVal = 0.0;
lineTransparencyVal = 0.0;
m_rotation = 0;
m_hasSoftShadow = false;
- isEmbedded = true;
- invalid = false;
p->save();
- p->translate(m_softShadowXOffset, m_softShadowYOffset);
+ p->translate(xOffset, yOffset);
DrawObj(p, QRectF());
p->colorizeAlpha(tmp);
if (m_softShadowBlurRadius > 0)
@@ -2371,18 +2369,15 @@
p->save();
FPointArray sh = PoLine.copy();
p->beginLayer(1.0, 18, &sh);
+ p->translate(xOffset - m_softShadowXOffset, yOffset - m_softShadowYOffset);
DrawObj(p, QRectF());
p->endLayer();
p->restore();
}
- if (isEmbedded_Old != isEmbedded)
- invalid = true;
- isEmbedded = isEmbedded_Old;
- m_hasSoftShadow = hasSoftShadow_Old;
fillTransparencyVal = fillTrans_Old;
lineTransparencyVal = lineTrans_Old;
+ m_hasSoftShadow = hasSoftShadow_Old;
m_rotation = rotation_Old;
- m_hasSoftShadow = shadow_Old;
}
else
{
More information about the scribus-commit
mailing list