[Qgis-developer] project file transformation
marco.hugentobler at karto.baug.ethz.ch
Wed Jun 18 03:50:27 EDT 2008
Ok, I wrote a transformation function from 0100 to 0110 in
qgsprojectfiletransform.cpp that adapts the pen width and pointsize. However,
to calculate the appropriate value, it is necessary to know the screen dpi.
What I did was to query QPixmap for it. I know this is bad, because
qgsprojectfiletransform is in core and QPixmap is a class that depends on a
running X-server. So I see the following possibilities:
1. Remove the include of QPixmap and use a standard dpi value (e.g. 96 for my
2. Use QPixmap (current Code)
3. Someone knows about a better possibility to find out screen dpi
My preferred possibility is 3. If this is not possible, then probably version
1 is best. Let me know what you think.
Btw. I found that there was a function to transform from 0.9.1 to 0.10.0 and
no function that adresses 0.9.2. I inserted a function from 0.9.2 to 0.10.0
that does nothing, but it would be cleaner to have transformation from 0.9.1
to 0.9.2 and from 0.9.2 to 0.10.0.
Am Samstag 17 Mai 2008 16:06:16 schrieb Tim Sutton:
> Hi Marco
> I wonder if its not better to make the change in Magnus Homanns rev-up
> code since this issue is going to affect everyone with old project and
> QGS files.
> regards Tim
> On 5/17/08, Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch> wrote:
> > Hi Tim,
> > The failing renderer tests are caused by the fact that units are now mm
> > instead of pixel.
> > I' going to change the width/size values of the test qmls and the test
> > images
> > to make it run again.
> > Regards,
> > Marco
> > Am Freitag 16 Mai 2008 21:19:56 schrieb Tim Sutton:
> >> Hi All
> >> Recent commits in the last few days have introduced regressions (as
> >> can be seen by running the unit tests). Please remember to run the
> >> unit tests before committing changes to SVN. Currently we only have a
> >> few tests but they test core stuff like rendering. If you committed
> >> anything in the last few days please take a look and see if you have
> >> introduced these issues.
> >> The issues involve mainly symbol sizes for rendering as best I can
> >> make out. BTW I have not yet tried the test suite under win,but it
> >> works under mac & lin.
> >> Many thanks
> >> Tim
> > --
> > Dr. Marco Hugentobler
> > Institute of Cartography
> > ETH Zurich
> > Technical Advisor QGIS Project Steering Committee
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
Dr. Marco Hugentobler
Institute of Cartography
Technical Advisor QGIS Project Steering Committee
More information about the Qgis-developer