Barcode.jar  ver 3.0.0
Java 開発者向け バーコード作成ライブラリ
公開メンバ関数 | 全メンバ一覧
pao.barcode.DataMatrix クラス

公開メンバ関数

 DataMatrix (Graphics2D g)
 
 DataMatrix (String filepath)
 
String getStringEncoding () throws Exception
 
void setStringEncoding (String value) throws Exception
 
DxCodeSize getCodeSize () throws Exception
 
void setCodeSize (DxCodeSize value) throws Exception
 
float getRotateAngle ()
 
int getImgMargin ()
 
void setImgMargin (int value)
 
void draw (byte[] data, float x, float y, float width, float height) throws Exception
 
void draw (byte[] data, float x, float y, float width, float height, String imgFilePath) throws Exception
 
void draw (String code, float x, float y, float width, float height) throws Exception
 
void draw (String code, float x, float y, float width, float height, String filePath) throws Exception
 
void drawDelicate (byte[] data, float x, float y, float minLinePitch) throws Exception
 
void drawDelicate (byte[] data, float x, float y, float minLinePitch, String imgFilePath) throws Exception
 
void drawDelicate (String code, float x, float y, float minLinePitch) throws Exception
 
void drawDelicate (String code, float x, float y, float minLinePitch, String filePath) throws Exception
 
void drawDirect (byte[] data, float x, float y, float width, float height) throws Exception
 
void drawDirect (byte[] data, float x, float y, float width, float height, String imgFilePath) throws Exception
 
void drawDirect (String code, float x, float y, float width, float height) throws Exception
 
void drawDirect (String code, float x, float y, float width, float height, String filePath) throws Exception
 
void WriteSVG (String code, float x, float y, float minLinePitch, String filePath) throws Exception
 
void WriteSVG (byte data[], float x, float y, float minLinePitch, String filePath) throws Exception
 
float getDrawDelicateWidth (String code, float minLinePitch) throws Exception
 
float getDrawDelicateWidth (byte code[], float minLinePitch) throws Exception
 
float getDrawDirectWidth (String code, float width) throws Exception
 
float getDrawDirectWidth (byte code[], float width) throws Exception
 

詳解

Class DataMatrix is a two-dimensional barcode library used to generate barcode with DataMatrix method.

QR Code is capable of handling all types of data, such as numeric and alphabetic characters, Kanji, Kana, Hiragana, symbols, binary, and control codes. Up to 7,089 characters can be encoded in one symbol.

The capacity differs from each encode mode: Numeric only Max. 7,089 characters Alphanumeric Max. 4,296 characters Binary (8 bits) Max. 2,953 bytes Kanji, full-width Kana Max. 1,817 characters

Class DataMatrix supports 3 encode mode: Numeric, Alphanumeric, and Binary 8 bit

著者
PAO

構築子と解体子

pao.barcode.DataMatrix.DataMatrix ( Graphics2D  g)

Byte Data Creates a new instance for DataMatrix

引数
gGraphics where the two-dimensional barcode is going to be generated in
pao.barcode.DataMatrix.DataMatrix ( String  filepath)

Creates a new instance for DataMatrix

引数
filePathoutput image file path

メソッド詳解

void pao.barcode.DataMatrix.draw ( byte[]  data,
float  x,
float  y,
float  width,
float  height 
) throws Exception

バーコードの描画を行う

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
void pao.barcode.DataMatrix.draw ( byte[]  data,
float  x,
float  y,
float  width,
float  height,
String  imgFilePath 
) throws Exception

バーコードを描画する コンストラクタでImageFormat指定時、画像ファイルに描画する。

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
imgFilePath画像ファイルパス
void pao.barcode.DataMatrix.draw ( String  code,
float  x,
float  y,
float  width,
float  height 
) throws Exception

バーコードの描画を行う

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
void pao.barcode.DataMatrix.draw ( String  code,
float  x,
float  y,
float  width,
float  height,
String  filePath 
) throws Exception

バーコードを描画する コンストラクタでImageFormat指定時、画像ファイルに描画する。

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
imgFilePath画像ファイルパス
void pao.barcode.DataMatrix.drawDelicate ( byte[]  data,
float  x,
float  y,
float  minLinePitch 
) throws Exception

バーコードの描画を行う

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画する間隔の最小幅の値を指定
void pao.barcode.DataMatrix.drawDelicate ( byte[]  data,
float  x,
float  y,
float  minLinePitch,
String  imgFilePath 
) throws Exception

バーコードの描画を行います。Draw メソッドとの違いは、バーコード全体の幅を指定するのではなく、バーを描画する一番細い線の幅を指定します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画するバーの最小ピッチの値を指定
imgFilePath画像ファイルパス
void pao.barcode.DataMatrix.drawDelicate ( String  code,
float  x,
float  y,
float  minLinePitch 
) throws Exception

バーコードの描画を行う(バイナリ格納)

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画する間隔の最小幅の値を指定
void pao.barcode.DataMatrix.drawDelicate ( String  code,
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception

バーコードの描画を行います。Draw メソッドとの違いは、バーコード全体の幅を指定するのではなく、バーを描画する一番細い線の幅を指定します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。 (バイナリ格納)

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画するバーの最小ピッチの値を指定
imgFilePath画像ファイルパス
void pao.barcode.DataMatrix.drawDirect ( byte[]  data,
float  x,
float  y,
float  width,
float  height 
) throws Exception

バーコードを指定した幅以内にピクセル単位でダイレクトに描画します。 幅が固定でありませんが、通常のDrawメソッドより精度・描画速度がよいです。 (バイナリ格納)

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
void pao.barcode.DataMatrix.drawDirect ( byte[]  data,
float  x,
float  y,
float  width,
float  height,
String  imgFilePath 
) throws Exception

バーコードを指定した幅以内にピクセル単位でダイレクトに描画します。 幅が固定でありませんが、通常のDrawメソッドより精度・描画速度がよいです。 (バイナリ格納)

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
imgFilePath画像ファイルパス
void pao.barcode.DataMatrix.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height 
) throws Exception

バーコードを指定した幅以内にピクセル単位でダイレクトに描画します。 幅が固定でありませんが、通常のDrawメソッドより精度・描画速度がよいです。

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
void pao.barcode.DataMatrix.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height,
String  filePath 
) throws Exception

バーコードを指定した幅以内にピクセル単位でダイレクトに描画します。 幅が固定でありませんが、通常のDrawメソッドより精度・描画速度がよいです。

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
widthバーコードの全体の幅を指定
heightバーコードのバーの高さを指定
imgFilePath画像ファイルパス
DxCodeSize pao.barcode.DataMatrix.getCodeSize ( ) throws Exception

シンボル コード サイズ

int pao.barcode.DataMatrix.getImgMargin ( )

Get Pixel of Image Margin

  • 戻り値
    Pixel of Image Margin
float pao.barcode.DataMatrix.getRotateAngle ( )

Returns barcode angle

戻り値
barcode angle
String pao.barcode.DataMatrix.getStringEncoding ( ) throws Exception

全角文字コード getBytes()の引数は受け付けます。 規定値:"UTF-8" 例:"SJIS" ...等...

void pao.barcode.DataMatrix.setImgMargin ( int  value)

Set Pixel of Image Margin

引数
valuePixelof Image Margin
void pao.barcode.DataMatrix.WriteSVG ( String  code,
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception

SVGファイルへのバーコードの出力を行います。

引数
code描画を行うバーコードのコードを文字列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画する間隔の最小幅の値を指定
filePathSVGファイルのファイル名をフルパスで指定
void pao.barcode.DataMatrix.WriteSVG ( byte  data[],
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception

SVGファイルへのバーコードの出力を行います。

引数
dataバーコードに格納するデータをバイト配列で指定
x描画位置の始点(左上)のX座標を指定
y描画位置の始点(左上)のY座標を指定
minLinePitchバーコードを描画する間隔の最小幅の値を指定
filePathSVGファイルのファイル名をフルパスで指定

このクラス詳解は次のファイルから抽出されました: