r16220 by fschmid - SVG Import: Do not inherit opacity settings from group nodes.
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 7 17:03:07 CET 2011
Author: fschmid
Date: Fri Jan 7 16:03:07 2011
New Revision: 16220
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16220
Log:
SVG Import: Do not inherit opacity settings from group nodes.
Modified:
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16220&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Fri Jan 7 16:03:07 2011
@@ -573,7 +573,16 @@
{
SvgStyle *gc = new SvgStyle;
if ( m_gc.top() )
+ {
*gc = *( m_gc.top() );
+ if (m_gc.top()->forGroup)
+ {
+ gc->forGroup = false;
+ gc->Opacity = 1.0;
+ gc->FillOpacity = 1.0;
+ gc->StrokeOpacity = 1.0;
+ }
+ }
m_gc.push( gc );
}
@@ -1081,6 +1090,7 @@
groupLevel++;
setupNode(e);
parseClipPathAttr(e, clipPath);
+ m_gc.top()->forGroup = true;
int z = m_Doc->itemAdd(PageItem::Group, PageItem::Rectangle, BaseX, BaseY, 1, 1, 0, CommonStrings::None, CommonStrings::None, true);
PageItem *neu = m_Doc->Items->at(z);
for ( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() )
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16220&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.h (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.h Fri Jan 7 16:03:07 2011
@@ -162,7 +162,8 @@
FillOpacity(1.0),
StrokeOpacity(1.0),
textAnchor("start"),
- clipPath()
+ clipPath(),
+ forGroup(false)
{
}
bool Display;
@@ -211,6 +212,7 @@
QString textAnchor;
QString textDecoration;
FPointArray clipPath;
+ bool forGroup;
};
class SVGPlug : public QObject
More information about the scribus-commit
mailing list