Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
QgsSymbolLayerUtils::decodeSldUom add decode Pixel uom
  • Loading branch information
rldhont authored and Gustry committed Jan 16, 2020
1 parent 92fc1ac commit 4a982a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/symbology/qgssymbollayerutils.cpp
Expand Up @@ -638,6 +638,12 @@ QgsUnitTypes::RenderUnit QgsSymbolLayerUtils::decodeSldUom( const QString &str,
*scaleFactor = 304.8; // from feet to meters
return QgsUnitTypes::RenderMapUnits;
}
else if ( str == QLatin1String( "http://www.opengeospatial.org/se/units/pixel" ) )
{
if ( scaleFactor )
*scaleFactor = 1.0; // from pixels to pixels
return QgsUnitTypes::RenderPixels;
}

// pixel is the SLD default uom. The "standardized rendering pixel
// size" is defined to be 0.28mm x 0.28mm (millimeters).
Expand Down

0 comments on commit 4a982a8

Please sign in to comment.