kpym / tikzedt

Automatically exported from code.google.com/p/tikzedt
30 stars 19 forks source link

Incorrect placement of the red crosses in the overlay view #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
In overlay mode, this occurs sometimes when zomming in and out with 
control+mouse scroll. I was not able to find steps for which this is 
reproducible. It just occurs when I don't want it to occur :p

What is the expected output? What do you see instead?
see the attached file

for other bug reports: (also, the zooming in and out seems very "messy"
-a lot of flickering between each zoom step
-it does not zoom at the position of the mouse 
-there is no way to pan (except with the scrollbars). Please add "middle-click 
to pan", it would be so much more confortable!)

What operating system and Latex distribution (Miktex/Texlive) are you
using?
Texlive, ubuntu linux 14.04 x64

Please provide any additional information below.
TikzEdt_0_2_2_linux_amd64 is used

Original issue reported on code.google.com by francois...@gmail.com on 19 Jun 2014 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

I am also experiencing the same problem. Being a programmer, here is my 
diagnosis: 
The further away 'x' nodes are from the physical 'center' of the image, the 
more offset they will appear to be with respect to their underlying object. So 
for instance, rectangle corners will appear to be misaligned with the 'x' 
overlays. This tells me that the transformation to screen coordinates is wrong 
somehow. It has either a rounding error (that gets propagated), or has a wrong 
scaling value, or something similar. I can't say for sure without looking at 
some code, but either way, the bug should be around that area. 

This can be confirmed in the picture that the previous user 'francois' has 
posted. Looking at the scroll bars on the right and bottom of the screen, it 
can be seen that his diagram is rather large. And he is viewing a portion of 
the screen that is very far from the 'center' of the image. 

You can reproduce this error in the following way:
1) Open a new diagram
2) Draw a small square in the initial area: this square should have all of its 
'x' corners aligned properly: this is good. 
3) Zoom out so that the initial square gets small, ie, change zoom to 10% or 
so. 
4) Draw a large rectangle that stretches very far to the right, so that its 
width is 20 times longer than the original square. Keep the height the same as 
the first square. 
5) Zoom in on the corners of the two objects, and they will now be misaligned. 
Another rectangle (having large height this time) can also be drawn, and will 
show the same error in the Y direction. 

Alternatively, copy and paste the following code to see the problem:
\begin{tikzpicture}
\draw  (-2,3) rectangle (1,-1);
\draw  (-7,6) rectangle (153,-3);
\node at (-7,7) {Overlay MISALIGNED HERE};
\draw  (68,5) rectangle (74,-1);
\node at (70,3) {Overlay Alignment is GOOD here};
\end{tikzpicture}

I hope this helps.

Robert

Original comment by robert.l...@gmail.com on 1 Aug 2015 at 4:21

GoogleCodeExporter commented 9 years ago
I can confirm the problem.... it is more or less certainly due to an imprecise 
scaling value for the transformation from pdf coordinates to screen coordinates.

Original comment by t.willwa...@gmail.com on 3 Aug 2015 at 7:47