X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/e13da1792fd4f47e32d4f316d8590336c5b5bffa..6f1cbfedd211c64b2e6b7b140fd17efddf51068d:/W32/W32.pm diff --git a/W32/W32.pm b/W32/W32.pm index fbae40da..89feecea 100644 --- a/W32/W32.pm +++ b/W32/W32.pm @@ -5,7 +5,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Imager::Font); BEGIN { - $VERSION = "0.85"; + $VERSION = "0.89"; require XSLoader; XSLoader::load('Imager::Font::W32', $VERSION); @@ -30,6 +30,12 @@ sub _bounding_box { my ($self, %opts) = @_; my @bbox = i_wf_bbox($self->{face}, $opts{size}, $opts{string}, $opts{utf8}); + unless (@bbox) { + Imager->_set_error(Imager->_error_as_msg); + return; + } + + return @bbox; } sub _draw { @@ -37,17 +43,15 @@ sub _draw { my %input = @_; if (exists $input{channel}) { - i_wf_cp($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'}, + return i_wf_cp($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'}, $input{channel}, $input{size}, $input{string}, $input{align}, $input{aa}, $input{utf8}); } else { - i_wf_text($self->{face}, $input{image}{IMG}, $input{x}, + return i_wf_text($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'}, $input{color}, $input{size}, $input{string}, $input{align}, $input{aa}, $input{utf8}); } - - return 1; } @@ -55,6 +59,10 @@ sub utf8 { return 1; } +sub can_glyph_names { + return; +} + 1; __END__