From: SourceForge.net <no...@so...> - 2009-11-18 21:59:24
|
Bugs item #2816150, was opened at 2009-07-03 08:52 Message generated for change (Comment added) made by ferrieux You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2816150&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 05. Canvas Items Group: current: 8.6b1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Yaroslav Schekin (yschekin) Assigned to: Donal K. Fellows (dkf) Summary: Rotated text displays incorrectly on WinXP Initial Comment: Run this script: --- canvas .c grid .c set id [.c create text 200 100 -text "Angled text" -angle 15 -font {Courier 42}] for {set f 40} {$f>20} {incr f -2} { .c itemconfigure $id -font "Courier $f" update } --- I see traces of bigger fonts in window. They dissapear on resizing it. ---------------------------------------------------------------------- >Comment By: Alexandre Ferrieux (ferrieux) Date: 2009-11-18 22:59 Message: Works for me on XPSP3. However, putting [after 500] in the loop to see the motion, I see "jerky" movements, with either the string's center moving, or even differential motion between individual chars. Looks like cumulative errors too. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-11-18 11:44 Message: That's because the error is in the computation of the bounding box of the text, which is necessary for working out what the minimal area to redraw is. When you do a full refresh (setting the background color of the canvas is the easiest way to do this from source code, BTW) then the code can just draw and not worry about minimizing the draw area. ---------------------------------------------------------------------- Comment By: Yaroslav Schekin (yschekin) Date: 2009-11-18 11:11 Message: After filing similar bug report about imove, I've noticed that these traces AND imove's line fragment go away if I just minimize/maximize window, or just send it to back, then to front. So it may be connected to canvas refresh. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-07-05 18:23 Message: It's exceptionally difficult to make this work right, as there are two possible areas for things to go wrong. Firstly, it's quite possible that there are rounding problems in the bbox calculation code (I welcome peer review, since I've stared at the code far too long to be able to see problems with it myself) and secondly, many platforms have problems with positioning of characters in text that is not angled parallel to one of the axes (particularly an issue with X11, where there are real issues with cumulative error handling). Which it is here, I don't know yet and I have no timescale for working on this. You can help distinguish by telling me if the problem gets worse as the text gets longer (a cumulative error problem) or stays the same (a bbox rounding problem). ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2009-07-03 10:54 Message: Confirmed, I tested it on XP, and see it as well. My first guess is that it is related with the function ComputeTextBbox (in tkCanvText.c), because geometry calculations with rotated text are tricky, there always can be rounding errors. Probably other platforms than win32 have the same problem (can someone confirm that?). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2816150&group_id=12997 |