[Qt-interest] Is there any mapping mode support in Qt Graphics Framework to map logical co-ordinates to physical co-ordinates

AK qtbond007 at gmail.com
Wed Jan 12 13:49:53 CET 2011


As I understood from above suggestion is:

If I have a A4 page (8 inch * 11 inch ) than to have 1000 logical points per
inch I should set the scenetRect to 8000,11000.
OR
I can have a root item of this size and make all other items children of
this root item.

Then I use the QTransform on View and scale it , depending on the screen
resolution (DPI) to show 1000 logical points on one inch.

This means that on DPI of 100 I have to scale scene to 1/10th for 100%
zoom.

I will be working on it.

Can I have more alternative ideas?

On Tue, Jan 11, 2011 at 2:47 PM, Sean Harmer <
sean.harmer at maps-technology.com> wrote:

> Hi,
>
> On Tuesday 11 January 2011 06:30:52 AK wrote:
> > Say my screen has a resolution of 92 DPI. I want to have 1000 logical
> > points per inch. So that even at 10 times zoom User can manipulate each
> > logical point.
> > How can I achieve this in Qt?
> >
> > In MFC its pretty straightforward. One has to select appropriate mapping
> > mode for device context. For above case one has to select MM_HIENGLISH.
>
> One option is to set a root item for your graphics scene and then set a
> scale
> transformation on this item to achieve the logical scale that you need.
>
> If all other items in your scene are children of this root item you can
> then
> use the usual mapTo* and mapFrom* functions to get from/to scene logical
> coords to/from physical coords.
>
> Cheers,
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110112/60b14683/attachment.html 


More information about the Qt-interest-old mailing list