示例#1
0
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 );
}
示例#2
0
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 );
}
示例#3
0
void QgsMapToPixel::transformInPlace( float& x, float& y ) const
{
  double mx = x, my = y;
  transformInPlace( mx, my );
  x = mx;
  y = my;
}
示例#4
0
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] );
}
示例#5
0
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] );
}
示例#6
0
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] );
}
示例#7
0
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;
}
示例#9
0
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 );
}
示例#10
0
QgsPoint QgsMapToPixel::transform( qreal x, qreal y ) const
{
  transformInPlace( x, y );
  return QgsPoint( x, y );
}
示例#11
0
QgsPoint QgsMapToPixel::transform( double x, double y ) const
{
  transformInPlace( x, y );
  return QgsPoint( x, y );
}