=encoding euc-jp =head1 名前 GD::Barcode::UPCE - GDでUPC-Eバーコード・イメージを作成します =head1 概要 I use GD::Barcode::UPCE; binmode(STDOUT); print "Content-Type: image/png\n\n"; print GD::Barcode::UPCE->new('123456')->plot->png; I<エラーチェック付き> my $oGdBar = GD::Barcode::UPCE->new('123456789'); die $GD::Barcode::UPCE::errStr unless($oGdBar); #長さが不正 =head1 DESCRIPTION GD::Barcode::UPCEはGD::Barcodeのサブクラスで、 GDでUPC-Eバーコードイメージを作成することを可能にします。 このモジュールは"Generate Barcode Ver 1.02 By Shisei Hanai 97/08/22"を ベースにしています。 =head2 new I<$oGdBar> = GD::Barcode::UPCE->new(I<$sTxt>); コンストラクタ。 I<$sTxt>のためのGD::Barcode::UPCE のオブジェクトを作成します。 I<$sTxt>は6あるいは7あるいは8桁の数字([0-9])です。 もしI<$sTxt>が6桁であれば、I<$sTxt>の先頭に'0'を加え、 あなたに代わってCDを計算します。 もしI<$sTxt>が7桁であれば、あなたに代わってCDを計算します。 =head2 plot() I<$oGd> = $oGdBar->plot([Height => I<$iHeight>, NoText => I<0 | 1>]); Lメソッドで指定されたI<$sTxt>のバーコードイメージを持った GDオブジェクトを作成します。I<$iHeight>はイメージの高さです。 もしIが1であればイメージにはI<$sTxt>のテキストのイメージは入りません。 例. my $oGdB = GD::Barcode::UPCE->new('123456'); my $oGD = $oGdB->plot(NoText=>1, Height => 20); # $sGDはHeight=>20ピクセルでテキストなしのGDイメージになります =head2 barcode() I<$sPtn> = $oGdBar->barcode(); '1'と'0'の文字列でバーコードのパターン返します。 '1'は黒、'0'は白を意味します。 例. my $oGdB = GD::Barcode::UPCE->new('123456'); my $sPtn = $oGdB->barcode(); # $sPtn = ''; =head2 $errStr $GD::Barcode::UPCE::errStr エラーメッセージが入ります。 =head2 $text $oGdBar->{$text} Lメソッドで指定されたI<$sTxt>をベースにしたバーコードのテキストが入ります。 =head1 作者 川合孝典 GCD00051@nifty.ne.jp =head1 著作権(COPYRIGHT) The GD::Barocde::UPCE module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. =head1 参考資料 GD::Barcode