← Back to team overview

kicad-developers team mailing list archive

Re: "Close in" work in pcbnew


Wayne Stambaugh wrote:
Dick Hollenbeck wrote:


Today I had some "close in" work to do in PCBNEW, while aligning some zone boundaries which were not on grid. I could not get the job done effectively without the following change to the zoom factors and zoom travel.

Please advise again the problem with the 5 entry. Maybe that can be fixed, I'm game to help with it.

I'll take a shot at this one because I think it will be a bit easier for
me to explain without having to translate to English. I believe it has
to do with this bug <http://trac.wxwidgets.org/ticket/10446#comment:1>.
Because the PCBNEW uses 10000 pixels to represent one inch, it doesn't
take a very large board to get into the coordinate range to cause this
problem. When the zoom setting is 0.5, the coordinates are scaled by a
factor of 2 making the problem more likely to occur. I know what you
are thinking, I don't have any devices capable of displaying 0x90000
pixels of resolution. However, any bugs in the clipping rectangle
calculations could allow for coordinates in this range to be passed to
wxDC even though they would be drawn off the client rectangle. In
wxGTK, this is not a problem except for drawing speed. In wxMSW, your
reaching for the hardware reset button. This is what JP was trying to
warn me about when I mentioned using wxDC to do the drawing instead of
the code in gr_basic.cpp. I am reasonably sure that if the clipping and
coordinate translation is handled correctly, coordinate values that
cause this bug would never get passed to wxDC. You should only ever
have drawing coordinates within the client rectangle. I still need to
verify that wxDC is the way to go. However, the wxMSW bug really needs
to be addressed. That being said, I originally had 0.5 as a zoom level
and didn't see any problems on wxMSW. I used the video demo to validate
the zoom code and I didn't see any issues when zoomed in to 0.5. I hope
this helps.



Reminds me of the 90's when Microsoft would change APIs just to break competing code. Maybe it's still going on.

On Windows, I hereby revoke my offer to help fix the problem.


Follow ups