Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#9060: use QGis::fromUnitToUnitFactor in QgsDxfExport
 in
  • Loading branch information
ahuarte47 committed Jan 14, 2014
1 parent b662d1b commit 5d59d83
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/core/dxf/qgsdxfexport.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 5d59d83

Please sign in to comment.