[Qgis-developer] Problem in shapefiles rendering

Martin Dobias wonder.sk at gmail.com
Mon Jun 16 17:53:58 EDT 2008


Hi,

sorry but with this amount of information really none can help you.
What exactly are you trying to do? Is it some QGIS-based application?
Why don't you use directly map canvas? Some more code to see what
actually is happening?

Martin

On Tue, Jun 10, 2008 at 8:20 AM, bargi john <bargi1981 at gmail.com> wrote:
> Hi all,
>
> I am trap in a strange problem while rendering shapefiles.
>
> I am used some code of [quote]qgsmapcanvas.cpp [/quote] for creating
> Graphicsview and QGraphicsScene.
>
> The code I have wrote is as follow:
> [code]
> View::View( QWidget *parent ): QGraphicsView( parent )
> {
>
>     m_scene = new QGraphicsScene();
>     setScene( m_scene );
>
>     setRenderHint( QPainter::Antialiasing );
>     setMouseTracking( true );
>
>     setFrameShadow( QFrame::Sunken );
>     setFrameShape ( QFrame::Panel  );
> }
> [/code]
>
> The m_scene  set here is used in other CPP file where items are added to
> scene. The code is as follow:
>
> [code]
>
> QGraphicsScene *Draw::scene() const
> {
>     return m_scene; // This object is same as set in View.cpp
> }
>
> void Draw::render()
> {
>  .........//  logic to extract items
>
>   m_scene->addItem( item ); //Here item is QGraphicsItem
> }
> [/code]
>
> The problem is that only point Shapfiles are drawing correctly.
> The line and polygon shapefiles are drawn   as inverted.
> If I put clutch using [quote]scale(1,-1) [/quote]  then it draw line and
> polygon correct but point shapefiles inverted.
>
> Can any body explain me this strange behavior   and solution to it.
>
> Thanks :(
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>


More information about the Qgis-developer mailing list