← Back to team overview

kicad-developers team mailing list archive

Re: Re: wxDC break through update.

 

jean-pierre.charras@... wrote:
> 
> 
> Wayne Stambaugh a écrit :
>> Wayne Stambaugh wrote:
>> 
>>> jean-pierre.charras@... wrote:
>>> 
>>>> USE_WX_ZOOM under Windows (XP) (wxGCDC not tested):
>>>> ratsnest in incorrectly drawn when one end of a ratsnest line is outside 
>>>> the visible area.
>>>> (not drawn or bad position)
>>>> 
>>> I'll take a look at this some time today. I probably missed a call to
>>> Scale or UnScale that needs to converted to LogicalToDevice or
>>> DeviceToLogical somewhere in the ratsnest code.
>>>
>>> Wayne
>>> 
>>
>> JP,
>>
>> I figured it out. It's clip_line() in gr_basic.cpp that is the problem.
>> When USE_WX_ZOOM is enabled, all of the coordinates are in drawing
>> (logical) units not screen (device) units. Therefore, coordinates can
>> have negative values and casting them to unsigned int in the function
>> USCALE() causes the problem. This should not be a problem for the known
>> Windows bug because wxDC::LogicalToDevice() will translate the
>> coordinates to screen units and only items that are visible in the
>> current screen will get drawn. The change didn't appear to cause any
>> problems on GTK either. I just committed the changes so let me know if
>> you find any other problems.
>>
>> Wayne
>>
>> 
> Others problems (pcbnew):
> at low level zooms (zoom level < 10 ):
> missing graphic items (segments like tracks, footprint outline segments,
> zone outlines segments) and erroneous solid polygons,
> depending on the zoom level and their position on screen.

Oops! I got a little over zealous in my clipping logic. I was
incorrect in my original assessment about the unsigned integer bug. I
fixed the clipping problem in svn r2326. Hopefully that also resolved
the missing graphics items problems as well.

Wayne

> 
> 
> -- 
> Jean-Pierre CHARRAS
> 
> Maître de conférences
> Directeur d'études 2ieme année.
> Génie Electrique et Informatique Industrielle 2
> Institut Universitaire de Technologie 1 de Grenoble
> BP 67, 38402 St Martin d'Heres Cedex
> 
> Recherche :
> GIPSA-LAB - INPG
> Rue de la Houille Blanche
> 38400 Saint Martin d'Heres

 




Follow ups

References