Skip to content
Permalink
Browse files

[Globe] Fix incorrect transparency conversion

  • Loading branch information
manisandro committed May 31, 2016
1 parent bb41cce commit 47397ee393740e3388ffbb76bbcc10dc797447fd
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/plugins/globe/globe_plugin.cpp
@@ -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 );
}
}

0 comments on commit 47397ee

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