Skip to content
Permalink
Browse files

Do not apply diagram transparency to pen

but instead save custom pen alpha value
  • Loading branch information
m-kuhn committed Aug 17, 2012
1 parent 55b5dcb commit a531626d3e1a0efaa9110f950c74513d5180382b
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/qgsdiagramrendererv2.cpp
@@ -54,8 +54,10 @@ void QgsDiagramSettings::readXML( const QDomElement& elem )
size.setHeight( elem.attribute( "height" ).toDouble() );
transparency = elem.attribute( "transparency", "0" ).toInt();
penColor.setNamedColor( elem.attribute( "penColor" ) );
penColor.setAlpha( 255 - transparency );
int penAlpha = elem.attribute( "penAlpha", "255" ).toInt();
penColor.setAlpha( penAlpha );
penWidth = elem.attribute( "penWidth" ).toDouble();

minScaleDenominator = elem.attribute( "minScaleDenominator", "-1" ).toDouble();
maxScaleDenominator = elem.attribute( "maxScaleDenominator", "-1" ).toDouble();

@@ -141,6 +143,7 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc
categoryElem.setAttribute( "width", QString::number( size.width() ) );
categoryElem.setAttribute( "height", QString::number( size.height() ) );
categoryElem.setAttribute( "penColor", penColor.name() );
categoryElem.setAttribute( "penAlpha", penColor.alpha() );
categoryElem.setAttribute( "penWidth", QString::number( penWidth ) );
categoryElem.setAttribute( "minScaleDenominator", QString::number( minScaleDenominator ) );
categoryElem.setAttribute( "maxScaleDenominator", QString::number( maxScaleDenominator ) );

0 comments on commit a531626

Please sign in to comment.
You can’t perform that action at this time.