Hello Marco,

thank you for your friendly and helpful reply!

On Friday 30 September 2011, 17:02:22, Marco Hugentobler 
<marco.hugentob...@sourcepole.ch> wrote:
> The class QgsMapToPixel  (src/core/qgsmaptopixel.cpp/.h) contains the
> transformation from map to pixel coordinates. Is this what you are looking
> for?

I'm 98% positive that yes, this is what I was looking for. One last 
confirmation, through:

---%<---
QgsPoint QgsMapToPixel::toMapPoint( double x, double y ) const
{
  double mx = x * mMapUnitsPerPixel + xMin;
  double my = -1 * (( y - yMax ) * mMapUnitsPerPixel - yMin );
  return QgsPoint( mx, my );
}
--->%---

Is this everything that QGis does to transform a POINT(long, lat) to a Pixel-
Point(x, y)? Because this is kind of what my naive approach (or what I thought 
it was) looked like, i.e., scaling factor plus correction of the counting 
direction.

                        Eric

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to