Hi,
On 09/04/2013 14:26, Ian Macdonald wrote:
FYI, I'm trying to refresh just a portion of my panel via EVT_PAINT, and
this is what the docs recommend.
No, wxRegionIterator isn't available. I'll be releasing a new version of
Wx in the next 24 hrs with this included.
I've done a fair amount of drawing code myself in the past and as I
found that I already knew the bounding rectangles of my discrete drawing
objects then something like
my $baseregion = $self->GetUpdateRegion;
for(my $i = 0; $i < @drawobjects; $i++) {
my $testregion = Wx::Region->new($baseregion);
if ($testregion->Intersect( $drawobjects->[$i]->boundingrect )) {
.... draw drawobject
}
}
Would allow me to limit redrawn areas.
However, I would also say that even with many thousands of vector
drawing primitives in a single drawing scheme, limiting redrawing by use
of the damaged regions produced no user perceivable change in the rate
of screen update. Other stuff in the way such as screen buffering
completely negated any effect I could produce reliably by limiting to
only running the redraw code for damaged rectangles.
Perhaps you will have better luck.
Cheers
Mark