[QGIS-trac] Re: [Quantum GIS] #1262: Point and Multipoint symbols are not drawn centered at location

Quantum GIS qgis at qgis.org
Mon Sep 1 16:28:34 EDT 2008


#1262: Point and Multipoint symbols are not drawn centered at location
-----------------------------------------------------+----------------------
        Reporter:  smizuno                           |         Owner:  nobody       
            Type:  bug                               |        Status:  new          
        Priority:  major: does not work as expected  |     Milestone:  Version 1.0.0
       Component:  Marker Symbols                    |       Version:  HEAD         
      Resolution:                                    |      Keywords:               
Platform_version:                                    |      Platform:  All          
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by timlinux):

 Hi

 Could you provide a small dataset I can use to replicate? I am interested
 to see if this patch will fix the point / multipoint alignment issues:

 Index: ../src/core/qgsvectorlayer.cpp
 ===================================================================
 --- ../src/core/qgsvectorlayer.cpp      (revision 9238)
 +++ ../src/core/qgsvectorlayer.cpp      (working copy)
 @@ -3293,7 +3293,8 @@
          transformPoint( x, y, theMapToPixelTransform, ct );
          //QPointF pt(x - (marker->width()/2),  y - (marker->height()/2));
          //QPointF pt(x/markerScaleFactor - (marker->width()/2),
 y/markerScaleFactor - (marker->height()/2));
 -        QPointF pt( x, y );
 +        QPointF pt( x*rasterScaleFactor - ( marker->width() / 2 ),
 y*rasterScaleFactor - ( marker->height() / 2 ) );
 +        //QPointF pt( x, y );

  #if defined(Q_WS_X11)
          // Work around a +/- 32768 limitation on coordinates in X11

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1262#comment:1>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list