AAC-Pvoice
view release on metacpan or search on metacpan
lib/AAC/Pvoice/Bitmap.pm view on Meta::CPAN
{
$tmpdc->SetTextBackground($bg);
$tmpdc->SetTextForeground(wxBLACK);
$tmpdc->SetFont($cfont);
$tmpdc->DrawText($caption, int(($x-$cw)/2),$y-$ch);
}
my $tmpfile = File::Temp::tmpnam();
$newbmp->SaveFile($tmpfile, wxBITMAP_TYPE_PNG);
local $/ = undef;
open(my $fh, "<$tmpfile");
binmode($fh);
my $image = <$fh>;
close($fh);
$cache->set("$file-$x-$y-$caption-$ibg-$blowup-$pbg-$mtime", $image);
}
my $fh = IO::Scalar->new(\$image);
my $contenttype = 'image/png';
return Wx::Bitmap->new(Wx::Image->newStreamMIME($fh, $contenttype))
}
( run in 0.244 second using v1.01-cache-2.11-cpan-87723dcf8b7 )