[patch] cosmetic fix for KPlotWidget

Zack Rusin zack at kde.org
Tue Dec 4 19:00:10 GMT 2007


On Monday 03 December 2007 09:31:23 am Hans Meine wrote:
> Am Montag, 03. Dezember 2007 14:58:37 schrieb Jason Harris:
> > On 12/2/07, Hans Meine <hans_meine at gmx.net> wrote:
> > > Argh!  This patch is *wrong*, the original was right.  What happens
> > > with *this* patch is that you effectively shift only the plot
> > > axes/grid, but not the data.  Thus, the data will not be put at the
> > > right positions anymore.
> >
> > Heh, I didn't expect all this controversy.  Well, I have applied the
> > first patch; the second I proposed but did not apply.  So I can just
> > leave things as they stand now.
>
> And after my last mail, I thought one could as well disable AA for drawing
> the grid, but the first patch would have been necessary then, too.  And if
> someone still wants to apply something like the second patch, he/she should
> make sure that the grid is not shifted to the right/bottom; I suspect that
> the half-integer coordinates could be exactly the problematic border case,
> i.e. they would be undesirably shifted by 1 pixel in each X/Y direction,
> which would have to be corrected by *not* shifting by (0.5,0.5) only when
> drawing with AA.(*)
>
> Ciao, /  /
>      /--/
>     /  / ANS
>
> *: Yes, this is another example where we need to think about things only
> because the AA/traditional painting use different coordinate systems.

man... i don't know what it is but everytime i send an email explaining how Qt 
works there's someone who quotes documentation that's been written based on 
what i wrote and tries to tell me how the code i wrote works. it's a little 
weird and unfortunately the bottom line is that i don't have time right now 
to be composin detailed emails explaining the intrinsic of how this all 
works. also the constant complaining is not really motivating me to explain 
it any better than i already did.
but no, basically everything you wrote in this email is wrong and the last one 
wasn't better. so lets try this again, but this time with the attached 
example. the example illustrates:
a) how to properly snap primitives (within the DRAW_GOOD_SNAPPING) - of course 
as i repeated a few times - this is vector graphics no amount of snapping 
will solve all the cases but this one is the closest,
b) how not to snap, which is what was committed (within the 
DRAW_WRONG_SNAPPING)
c) why "b" is wrong and how it breaks (within the MESS_UP_SNAPPING)
d) that the coordinate systems do match, it's just that the the aliased one 
rounds up towards ceil (with SHOW_WHERE_ALIASED_COORDINATES_START)

i think this should answer almost all the questions posed in this thread. what 
it doesn't answer is why it was done this way but life has its mysteries and 
the sooner we learn to deal with them the better.

also i'm a little overworked now so i had to temporarily disable email 
delivery from this list. if you have more questions then please reduce the 
amount of rather nasty complaining and CC me on replies.

z
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 1382 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071204/586a5bf1/attachment.cpp>


More information about the kde-core-devel mailing list