[Qgis-developer] Re: Draw a single point
Martin Dobias
wonder.sk at gmail.com
Mon Dec 14 09:52:34 EST 2009
2009/12/11 sergio cavalcante <sergio.cavalcante at gmail.com>:
> Germán! It workerd great!
> As I'm using C++ with Qt, the code to draw just a white point is here:
>
> QgsVertexMarker *marker = new QgsVertexMarker(m_qgsImage);
>
> marker->setCenter( QgsPoint( -51.235, -16.9316 ) );
> //marker->setCenter( QgsPoint( -51.235, -16.9316 ) );
> marker->setIconType( 3 );
> marker->setIconSize( 10 );
> marker->setColor( QColor( 255,255,255,255 ) );
> marker->setPenWidth ( 1 );
>
> I was very happy...Until I zoomed the area. As a vector, obviously,
> when zoomed, it remained as a small point. And, as I need to draw a
> lot of points to draw a larger image composed by them, I needed that
> this zoom to escale the point like a raster file. Is there a way to
> plot the point onto the rasterfile?
Hi Sergio,
what are you actually trying to do? Draw an image on the canvas at
some specified place? You might want to create a class derived from
QgsMapCanvasItem that would do the rendering in a way you want it to
be.
Martin
More information about the Qgis-developer
mailing list