On Fri, Jul 01, 2016 at 05:58:57PM +0200, Sandro Santilli wrote: > On Thu, Jun 30, 2016 at 10:14:34PM +0100, Barry Rowlingson wrote: > > Maybe I've missed something here, but doesn't the canvas resize method > > set the canvas pixel size? This behaves as expected when run > > standalone from a python prompt. > > It does ! Thanks for the pointer.
Still, my problem is the following: QgsMapCanvas *mCanvas = new QgsMapCanvas(); mCanvas->resize( QSize(50, 50) ); mCanvas->setExtent( QgsRectangle( 0, 0, 50, 50 ) ); QCOMPARE( mCanvas->scale(), 1.0 ); //<-- fails, returning 3.1631e+07 --strk; _______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
