Class: fontPrintControl

fontPrintControl(g, asciiPtn, aw, ah, KanjiPtn, kw, kh)

FontPrintControl Utf16 String Draw Text

Constructor

new fontPrintControl(g, asciiPtn, aw, ah, KanjiPtn, kw, kh)

ビットマップ画像として用意されたフォントパターンを用いて、
\ UTF-16文字列を描画する機能を提供します。
\ 半角ASCII文字、半角カナ、全角漢字の描画に対応しています。
Parameters:
Name Type Description
g GameCore GameCore instance
asciiPtn Img ASCII Font Image
aw number ASCII Font width
ah number ASCII Font height
KanjiPtn Img KANJI Font Image
kw number KANJI Font width
kh number KANJI Font height
Source:
Example
fprint = new fontPrintControl(
 screen, 
 image"pict/k12x8_jisx0201c.png", 6, 8,
 image"pict/k12x8_jisx0208c.png",12, 8
);

Methods

print(str, x, y)

指定された文字列をフォントパターンを使用して画面に描画します。
\ 文字列、X座標、Y座標を指定し、
\ 各文字はフォントパターンから切り出され、順に表示されます。
Parameters:
Name Type Description
str string 表示文字列
x number 表示位置x座標
y number 表示位置y座標
Source:

putchr(str, x, y, z)

指定された文字列の各文字を個別に、拡大率を適用して描画します。
\ 文字列、X座標、Y座標、そして任意の拡大率(Z)を指定することで、
\ 文字のサイズを調整して表示できます。
Parameters:
Name Type Description
str string 表示文字列
x number 表示位置x座標
y number 表示位置y座標
z number 拡大率
Source:

useScreen(num)

フォント描画に使用するスクリーンバッファを選択します。
Parameters:
Name Type Description
num number DisplayControl (screen) No
Source: