← Back to team overview

kicad-developers team mailing list archive

Re: Fedora 21 nightlies build

 

Hey Miguel,

I would not wish the wxDC code in KiCad on my worst enemy but if you are
feeling brave enough then I'll try to point you in the right directions
(yes, there are many).  Be forewarned, there be demons in there.

Most of the drawing and clipping code is in common/gr_basic.cpp

The canvas scaling and offsetting code is in common/draw_panel.cpp

The scrollbar scaling and position code is in common/draw_frame.cpp

The wxDC helper macros are in include/kicad_device_context.h

There is a lot to digest here.  The problem AFAICT is scaling and
offsetting between the logical (drawing) and device (screen)
coordinates.  There may also be some clipping issues as well.

Have fun!

Wayne

On 2/14/2015 7:07 PM, Miguel Ángel Ajo wrote:
> Sorry, it seems that we were writing at the same exact moment.
> 
> If you could point me to where we setup the canvas, and use it
> to draw, I would try to write a simple reproducer, may be this
> way we can get the gtk3 version working in the long term :)
> 
> Best regards,
> Miguel Ángel 
> 
> Miguel Ángel Ajo
> 
> On Sunday, 15 de February de 2015 at 00:58, Miguel Ángel Ajo wrote:
> 
>> Btw, Wayne, thank you for pointing me out that probably wxWidgets+gtk3
>> was the problem :-)
>>
>> If you have some time to provide me with more information I will try
>> to file bugs where necessary to get that fixed.
>>
>> Miguel Ángel Ajo
>>
>> On Saturday, 14 de February de 2015 at 23:18, Miguel Ángel Ajo wrote:
>>
>>>
>>> Fedora 21 nightlies build is fully working now (no more canvas
>>> problems), I 
>>> had to recompile wxGTK3 with ‘gtk2’ and wxPython with that build,
>>> then kicad on top.
>>>
>>> If you had the repo configured previously, do a:
>>>
>>> dnf clean all
>>> dnf remove wxGTK3 wxPython kicad
>>> dnf install kicad
>>>
>>> Otherwise follow the instructions at:
>>> https://copr.fedoraproject.org/coprs/mangelajo/kicad/
>>>
>>>
>>> To override other wxGTK3 or wxPython versions, I have bumped the
>>> revisions of those
>>> with +1000, but that’s a bit hacky, and may break when fedora
>>> releases new wxGTK3 versions,
>>> I will look into a definitive solution as soon as I can, but that may
>>> work for now.
>>>
>>> Please, let me know how if it works/doesn’t work for you.
>>>
>>> Eventually I will set a builder for the stable version too.
>>>
>>> Best regards, 
>>> Miguel Ángel Ajo
>>>
>>> On Thursday, 15 de January de 2015 at 11:25, Miguel Ángel Ajo wrote:
>>>
>>>>
>>>> I wanted to announce that I have created this repository with
>>>> nightly builds for KiCad:
>>>> https://copr.fedoraproject.org/coprs/mangelajo/kicad/
>>>> http://ci.kicad-pcb.org/job/fedora-nightlies/
>>>>
>>>> It has wxPython and python scripting enabled, and it’s based on
>>>> wxWidgets 3.0.0,
>>>> as kicad is now.
>>>>
>>>> For now you will find it’s a bit broken, as the wxGTK3 canvas is not
>>>> working correctly
>>>> (having the same issue if I don’t link to wxPython3 and do it to the
>>>> fedora stock wxGTK3),
>>>> that means eeschema is quite unusable, pcbnew only works correctly
>>>> on the OpenGL or Cairo Canvas.
>>>>
>>>> By the way, even broken I believe it’s a good opportunity for anyone
>>>> willing to have a look on the latest release.
>>>>
>>>> Miguel Ángel Ajo
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help : https://help.launchpad.net/ListHelp
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References