Skip to content

Commit

Permalink
[Globe] Fix incorrect transparency conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed May 31, 2016
1 parent bb41cce commit 47397ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -798,15 +798,15 @@ void GlobePlugin::addModelLayer( QgsVectorLayer* vLayer, QgsGlobeVectorLayerConf
{
osgEarth::LineSymbol* ls = style.getOrCreateSymbol<osgEarth::LineSymbol>();
QColor color = sym->color();
ls->stroke()->color() = osg::Vec4f( color.redF(), color.greenF(), color.blueF(), color.alphaF() * ( 255.f - vLayer->layerTransparency() ) / 255.f );
ls->stroke()->color() = osg::Vec4f( color.redF(), color.greenF(), color.blueF(), color.alphaF() * ( 100.f - vLayer->layerTransparency() ) / 100.f );
ls->stroke()->width() = 1.0f;
}
else if ( sym->type() == QgsSymbolV2::Fill )
{
// TODO access border color, etc.
osgEarth::PolygonSymbol* poly = style.getOrCreateSymbol<osgEarth::PolygonSymbol>();
QColor color = sym->color();
poly->fill()->color() = osg::Vec4f( color.redF(), color.greenF(), color.blueF(), color.alphaF() * ( 255.f - vLayer->layerTransparency() ) / 255.f );
poly->fill()->color() = osg::Vec4f( color.redF(), color.greenF(), color.blueF(), color.alphaF() * ( 100.f - vLayer->layerTransparency() ) / 100.f );
style.addSymbol( poly );
}
}
Expand Down

0 comments on commit 47397ee

Please sign in to comment.