From 7546fca7fbaf78442cbfe523a78ac2cdd71512e0 Mon Sep 17 00:00:00 2001 From: g_j_m Date: Thu, 14 Apr 2005 19:52:56 +0000 Subject: [PATCH] commot forogtten file to go with the .h git-svn-id: http://svn.osgeo.org/qgis/trunk@3159 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/qgscoordinatetransform.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/qgscoordinatetransform.cpp b/src/qgscoordinatetransform.cpp index 8b8eff744df..9249988a47d 100644 --- a/src/qgscoordinatetransform.cpp +++ b/src/qgscoordinatetransform.cpp @@ -208,6 +208,26 @@ QgsPoint QgsCoordinateTransform::transform(const double theX, const double theY= return transform(QgsPoint(theX, theY), direction); } +void QgsCoordinateTransform::transformInPlace(double& x, double& y, + TransformDirection direction) const +{ + if (mShortCircuit || !mInitialisedFlag) + return; + + // transform x + double z = 0.0; + try + { + transformCoords(1, x, y, z, direction ); + } + catch(QgsCsException &cse) + { + //something bad happened.... + // rethrow the exception + throw cse; + } +} + QgsRect QgsCoordinateTransform::transform(const QgsRect theRect,TransformDirection direction) const { if (mShortCircuit || !mInitialisedFlag) return theRect;