kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01141
Re: Re: redraw on erase track segment
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
jean-pierre charras <jean-pierre.charras@...>
-
Date:
Wed, 05 Mar 2008 19:12:53 +0100
-
In-reply-to:
<47CED4B5.2060505@...>
-
User-agent:
Thunderbird 2.0.0.12 (Windows/20080213)
Dick Hollenbeck a écrit :
PS:
I tested the new code about delete track segment on a very large board
(8 layers, 4000 pads 1350 vias...)
It is reasonably fast on my PC ( a low cost computer which is 4 years old).
An enhancement could be to redraw only the region modified in order to
reduce the flicker (all kicad draw functions already use a clip box).
Jean-Pierre,
If we can do this inside of the event loop then I think this is a good
idea. If you are talking about doing it "in line" and not in the event
loop, then I don't think this is a good idea. (The MAC boys have
complained about unnecessary stuff happening outside the event loop.)
Normally when the event loop dispatches to the application it can pass
the dirty rectangle and this is what I think would be an improvement,
but only if Kicad can handle it there.
Looking at *void* wxWindow::*Refresh*(*bool*/ eraseBackground = true/,
*const wxRect <cid:part1.04050801.07080900@...>* */rect = NULL/)
we see that it takes a "dirty" rectangle, a subset of the window to
repaint or to mark as dirty. And this would be consistent with working
with the event loop properly.
Can Kicad receive this dirty rectangle in its event dispatcher and pay
attention to it? If yes, then great, if not...... well we could add
the dirty rect to the call, and later pay attention to the rectangle.
Please let me know and if there is an example, please point me to it and
I will be happy to add this support to my patch.
Thanks,
Dick
void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event ) uses an
wxRegionIterator to redraw only damaged rectangles,
and WinEDA_DrawPanel::ReDraw( wxDC* DC, bool erasebg ) uses a
wxDCClipper to redraw only this rectangle.
I hope (and believe) this code is working, and perhaps calling
wxWindow::Refresh(bool eraseBackground = true, const wxRect* rect =
NULL) (or RefreshRect) with a non NULL wxRect* rect parameter could do
the trick.
(Besides the class MODULE handles the rectangle coordinate which
contains the entire module (.m_BoundaryBox member) )
--
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-LIS - INPG
46, Avenue Félix Viallet
38031 Grenoble cedex
References