From kstars-devel Mon Aug 13 15:37:49 2007 From: Jason Harris Date: Mon, 13 Aug 2007 15:37:49 +0000 To: kstars-devel Subject: Re: [Kstars-devel] branches/work/kdeedu_kstars_htm/kstars/kstars Message-Id: <200708130837.49804.kstars () 30doradus ! org> X-MARC-Message: https://marc.info/?l=kstars-devel&m=118703120402964 Hi James, On Monday 13 August 2007 07:55:35 am James Bowlin wrote: > On Mon August 13 2007 7:39 am, Jason Harris wrote: > > That is so weird.  Is it the screen (X,Y) coordinates changing, or > > just the sky coordinates that are supposed to correspond to X,Y? > > > > When am infobox is grabbed with the mouse, they are now all being > > drawn with the "grab color", instead of only the grabbed box. > > I should have been more clear. This has nothing to do with grabbing. Actually, I was unclear. The grabbing thing was a bug report, unrelated to the moving boxes issue. > I added a new routine, reserveBoxes(), that is similar to drawBoxes(). > In it, I don't draw anything, instead I use SkyLabeler to "mark" the > area under each info box so other labels won't overlap them. > > This routine is called from near the top of SkyMapComposite::draw(). > I noticed that it didn't work reliably, especially when skewing. > I put in printf statements in drawBoxes() and reserveBoxes() to print > out the (x,y) coordinates of one of the boxes. For debugging, I > also made SkyLabeler draw the outlines of the rectangle whenever > markRect() was called (hence the psky parameter). > > What I found was that even though the coordinates in drawBoxes() stayed > constant, the coordinates during the reserveBoxes() call would sometimes > change. This is what led me to saving the coordinates in the > drawBoxes() routine for later use in reserveBoxes(). > > If you want to work on this, I suggest uncommenting the drawLine block > in SkyLabeler::markRect() (it is only called from InfoBoxes). The info > boxes should be outlined in mostly solid red (unless there are things > in the sky overwriting the outlines). Then stop using the saved > coordinate kludge in reserveBoxes(). The red outlines will flicker. > > Printf's will also work but they scroll by fast. _______________________________________________ Kstars-devel mailing list Kstars-devel@kde.org https://mail.kde.org/mailman/listinfo/kstars-devel