Hi Peter,

On Dienstag, 1. April 2008, Peter Clifton wrote:
> On Tue, 2008-04-01 at 10:06 +0200, Werner Hoch P wrote:
> > there was a commit on 2007-11-18 that changes the updates of
> > coordinates when zooming / paning.
>
> This one?

Yes,

> (If you could quote the commit ID, that helps find it.)

Sorry, I've only copied the header from gitk.

> commit 626f5c071a1dfea55e0214f6064b29908152d792
> Author: Peter Clifton <[EMAIL PROTECTED]>
> Date:   Sun Nov 18 19:21:34 2007 +0000
>
>     Update the all drawing state SCREEN co-ordinates when zooming /
> panning.
>
>     By updating all of the co-ordinate state when zooming / panning,
> a redraw which includes a draw of any rubberbanded items will show
> them in the correct location. This allows XOR drawing to continue
> without dropping artifacts, or flashing up a "ghost" where the
> original element being moved was. The explicit erase for the gost
> item when moving is no longer needed.
>
> > Do you remember which drawing artefacts you've tried to avoid?
>
> IIRC, When zooming, there were multiple redraws. An object was first
> drawn in the wrong place, then erased with o_erase_selected, then
> drawn again in the right place.
>
> The code changes aimed to get the selected object drawn in the
> correct place first time. Some other (in a different commit I think)
> changes ensure that the selected object isn't being drawn.

Ok. This seems all be related to the drawing of the selection list.

> > If I draw a single line, box, circle, ... this change causes
> > artefacts that the old code tried to avoid.
>
> Is that when zooming?

Yes.

> I don't think the correct fix is reverting this, but fixing the other
> cases. The screen coordinate updates in a_pan_general() are really
> not nice, we should move this to world coordinates for a proper fix.

I'll post a proposal how the switch to world coordinates should be done.

> This said, looking over the patch, I suspect the distance may be
> being set incorrectly if there is panning involved. Is that why
> distance, loc_y and loc_x were set to zero in the old code? (Try
> reverting to that behaviour for those variables).
>
> I'm away the rest of this week, but would obviously be interested in
> a fix for this. Let me know what you find, or how to reproduce the
> artifacts and I'll look at it when I'm back.

* put the center of a circle, 
* zoom/pan,
* move mouse

* set the first point of a rectangle
* zoom/pan,
* move mouse

Why this happens:
The zoom/pan removes all rubber lines from the screen. 
When moving the mouse the rubber function from the element erases that 
rubber lines a second time with a XOR function, it becomes visible 
again.
Then the rubber lines are redrawn by the rubber function.


In the net drawing code I've added a test to prevent this accidental 
erase. In o_net_eraserubber:
-------
  if (! w_current->rubbernet_visible)
    return;
-------

This kind of protection could be used for all object types.

Regards
Werner


_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to