QgsPoint QgsMapToPixel::transform( const QgsPoint &p ) const { qreal x = p.x(), y = p.y(); transformInPlace( x, y ); // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p.x()).arg(dx).arg(p.y()).arg(dy)); return QgsPoint( x, y ); }
void QgsMapToPixel::transform( QgsPoint *p ) const { qreal x = p->x(), y = p->y(); transformInPlace( x, y ); // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p->x()).arg(x).arg(p->y()).arg(y)); p->set( x, y ); }
void QgsMapToPixel::transformInPlace( float& x, float& y ) const { double mx = x, my = y; transformInPlace( mx, my ); x = mx; y = my; }
void QgsMapToPixel::transformInPlace( std::vector<double>& x, std::vector<double>& y ) const { assert( x.size() == y.size() ); for ( unsigned int i = 0; i < x.size(); ++i ) transformInPlace( x[i], y[i] ); }
void QgsMapToPixel::transformInPlace( QVector<float>& x, QVector<float>& y ) const { assert( x.size() == y.size() ); for ( unsigned int i = 0; i < x.size(); ++i ) transformInPlace( x[i], y[i] ); }
void QgsMapToPixel::transformInPlace( QVector<double>& x, QVector<double>& y ) const { assert( x.size() == y.size() ); for ( int i = 0; i < x.size(); ++i ) transformInPlace( x[i], y[i] ); }
void QgsCoordinateTransform::transformInPlace( qreal& x, qreal& y, double& z, TransformDirection direction ) const { double xd = ( double ) x, yd = ( double ) y; transformInPlace( xd, yd, z, direction ); x = xd; y = yd; }
void QgsCoordinateTransform::transformInPlace( float& x, float& y, double& z, TransformDirection direction ) const { double xd = static_cast< double >( x ), yd = static_cast< double >( y ); transformInPlace( xd, yd, z, direction ); x = xd; y = yd; }
void QgsMapToPixel::transform( QgsPoint* p ) const { double x = p->x(); double y = p->y(); transformInPlace( x, y ); #ifdef QGISDEBUG // QgsDebugMsg(QString("Point to pixel...X : %1-->%2, Y: %3 -->%4").arg(p->x()).arg(x).arg(p->y()).arg(y)); #endif p->set( x, y ); }
QgsPoint QgsMapToPixel::transform( qreal x, qreal y ) const { transformInPlace( x, y ); return QgsPoint( x, y ); }
QgsPoint QgsMapToPixel::transform( double x, double y ) const { transformInPlace( x, y ); return QgsPoint( x, y ); }