AAC-Pvoice
view release on metacpan or search on metacpan
lib/AAC/Pvoice/Bitmap.pm view on Meta::CPAN
147148149150151152153154155156157158159160161162163164165166167
{
$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.234 second using v1.01-cache-2.11-cpan-8d75d55dd25 )