[Kstars-devel] Problem with getXY()
Pablo de Vicente
p.devicente at wanadoo.es
Fri Feb 13 22:44:58 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Jason,
I have almost addressed all issues concerning the angular distance
measurement tool but I still have problems plotting the ruler. I have not
commited the changes yet till I fix this last issue. The way I plot the ruler
is as follows: when the angular distance mode is activated the first point is
stored in a SkyObject called previousClickedObject. When the angular mode is
finished the distance is computed (correctly) and to plot the line I create
the first QPoint like this:
beginRulerPoint = getXY( previousClickedPoint(), false, true);
and the second one using the instruction:
QPoint(e->x() , e->y() )
where e is a pointer to QMouseEvent
I use false for the second argument of getXY because the coordinates of
previousClickedPoint() are stored from the RA and Dec and no explicit
conversion is done towards Az, El. I used true for the third argument to
apply refraction correction, but since the other argument is false, this is
not appliable.
I have debugged the code and the X,Y coordinates returned by getXY are
incorrect, however the RA and Dec for previousClickedPoint are correct. So, I
suppose that there is a problem with how I call function getXY.
getXY accepts as a last argument, scale, which is = 1 by default. I do
not know which value I should use for scale, and if this is the source of
problems.
I have noticed that the error plotting the ruler follows a pattern which
divides the screen in two halfs, one to the left and one the right. That is,
the artificial offset in X is different when X <0 than when X > 0.
Any ideas?.
regards
Pablo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFALUVaSItUpHl6kJERAkoKAKD1LU29+KsZSQY/iY4k+mmxuZrBaACfWXVD
zVG7oK9j5+s8FeOPsU0c0Ds=
=ImmW
-----END PGP SIGNATURE-----
More information about the Kstars-devel
mailing list