← Back to team overview

kicad-developers team mailing list archive

Re: help with redraw

 

Hi Orson,

that fixed it. Thanks a lot!

Cheers,
Andreas


On 12/21/2017 01:11 PM, Maciej Sumiński wrote:
> Hi Andreas,
> 
> You might be missing VIEW::Update() [1] call to invalidate a VIEW_ITEM
> after it has been modified. If it does not help, I will have a look at
> the code.
> 
> Cheers,
> orson
> 
> 1.
> http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/classKIGFX_1_1VIEW.html#af8f6652fbafaf7ed08281ee9311e7857
> 
> 
> On 12/21/2017 01:02 PM, Andreas Buhr wrote:
>> Hi,
>>
>> could you maybe help me finding the right redraw or refresh or whatever
>> function? I can draw everything, but I see my polygons only after I
>> switched the canvas once (Cairo->OpenGL or vice versa). So my workflow
>> at the moment is: 1. Open pcbnew, 2. switch the canvas, 3. then work
>> normally.
>>
>> I followed the structure of RATSNEST and added a layer "LAYER_SI_MESH"
>> (like "LAYER_RATSNEST").
>>
>> https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/include/layers_id_colors_and_visibility.h#L205
>>
>>
>> I then added a "SI_MESH_VIEWITEM" (like "RATSNEST_VIEWITEM") which has a
>> "ViewDraw" function, wherein I draw the polygons on the GAL.
>>
>> https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/pcbnew/si_mesh_viewitem.cpp#L54
>>
>>
>> In PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard ), I added the
>> SI_MESH_VIEWITEM
>>
>> https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/pcbnew/pcb_draw_panel_gal.cpp#L178
>>
>> But it seems I am missing something. Any suggestions?
>>
>> Thanks a lot!
>> Andreas
>>
>> _______________________________________________
>> 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
>>
> 
> 
> 
> 
> _______________________________________________
> 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