Math-PlanePath

 view release on metacpan or  search on metacpan

examples/c-curve-wx.pl  view on Meta::CPAN

622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# $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 )