Math-PlanePath
view release on metacpan or search on metacpan
examples/c-curve-wx.pl view on Meta::CPAN
622623624625626627628629630631632633634635636637638639640641642# $idle_drawing is a coderef which is setup by OnPaint() to draw more of the
# curves. If it doesn't finish the drawing then it does a ->RequestMore()
# to go again when next idle (which might be immediately).
my
$idle_drawing
;
sub
OnPaint {
my
(
$draw
,
$event
) =
@_
;
### Drawing OnPaint(): $event
### foreground: $draw->GetForegroundColour->GetAsString(4)
### background: $draw->GetBackgroundColour->GetAsString(4)
my
$busy
= Wx::BusyCursor->new;
my
$dc
= Wx::PaintDC->new (
$draw
);
{
my
$brush
=
$dc
->GetBackground;
$brush
->SetColour (
$draw
->GetBackgroundColour);
$dc
->SetBackground (
$brush
);
$dc
->Clear;
}
# $brush->SetColour (Wx::wxWHITE);
( run in 0.340 second using v1.01-cache-2.11-cpan-00829025b61 )