[Qt-interest] Coordinate system decision

Sujan Dasmahapatra sdh at lmglasfiber.com
Mon Mar 30 12:44:29 CEST 2009


Dear Bastian
Coordinate system is one of the problems I faced in preliminary design
of my propject.basically what I felt is that its upside down.There are
no major changes in x direction only  incase of y direction its actually
full positive down so if you change +y to  -y and -y to +y your geometry
import or export would not be a problem whatever u use whether  top-left
or bottom-left it doesn't matter. 

Kind Regards,
Sujan Dasmahapatra
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Bastian Bense
Sent: Monday, March 30, 2009 3:59 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Coordinate system decision

Hey folks,

I'm about to begin an implementation for a work project which manages
layouts and layout contents, and I've got to make a technical decision
about wether to use coordinates beginning at the top-left or
bottom-left corner.

The coordinate data I have to work with (importing, exporting) is 99%
based on a bottom-left coordinate system. I'll also have to control a
PDF library in order generate preview sheets and the PDF-library
(normal for PDF and PostScript) also is based on a bottom-left
coordinate system.

User feedback and bug reports usually provide bottom-left coordinates,
so that would help with the debugging.

Qt offers a number of classes for managing coordinates and objects,
such as QRect(), QPoint(), etc, but most of them rely on a top-left
coordinate system - especially the methods of QRect(), such as
setRight(), setBottom(). I think it would be nice to be able to use
them, though.

I once made a bad decision in the past by internally managing all
coordinates in a top-left coordinate system to have less problems
displaying them - but that resulted in A LOT more work when importing,
exporting and actually working with the data.

One idea is to use QTransform to help a bit with the exporting of
rotated, recursive objects (layouts within layouts).

Any suggestions, ideas, feedback? I'd love to hear your thoughts, so I
can make the best decision possible.

Thanks in advance,
Bastian
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list