Skip to content
Permalink
Browse files

#9060: use QGis::fromUnitToUnitFactor in QgsDxfExport

 in
  • Loading branch information
ahuarte47 committed Jan 14, 2014
1 parent b662d1b commit 5d59d83d0f8c66c1e64e2f00c0d33ed410bb3b66
Showing with 2 additions and 18 deletions.
  1. +2 −18 src/core/dxf/qgsdxfexport.cpp
@@ -962,15 +962,7 @@ double QgsDxfExport::scaleToMapUnits( double value, QgsSymbolV2::OutputUnit symb
}

//symbology in mm
value *= mSymbologyScaleDenominator / 1000;
if ( mapUnits == QGis::Feet )
{
value *= 0.3048;
}
else if ( mapUnits == QGis::Degrees )
{
value /= 111120;
}
value *= ( mSymbologyScaleDenominator * QGis::fromUnitToUnitFactor( mapUnits, QGis::Meters ) ) / 1000;
return value;
}

@@ -1279,15 +1271,7 @@ double QgsDxfExport::dashSeparatorSize() const

double QgsDxfExport::sizeToMapUnits( double s ) const
{
double size = s;
if ( mMapUnits == QGis::Feet )
{
size /= 0.3048;
}
else if ( mMapUnits == QGis::Degrees )
{
size /= 111120;
}
double size = s * QGis::fromUnitToUnitFactor( QGis::Meters, mMapUnits );
return size;
}

0 comments on commit 5d59d83

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