Kagetaka

net.hizlab.kagetaka.rendering
クラス Canvas

java.lang.Object
  拡張net.hizlab.kagetaka.rendering.Canvas

public class Canvas
extends Object

描画パネルに描画するブロックイメージを保持するクラスです。

バージョン:
$Revision: 1.8 $

フィールドの概要
static char DRAW_SOKUYOU
          促音と拗音を表すオプション
 Graphics g
           
 Image image
           
 ItemMap itemMap
           
 int width
           
 int x
           
 
コンストラクタの概要
Canvas(Drawkit drawkit, Status status, Canvas prev, int width, int height, int totalWidth)
          描画キャンバスを作成します。
 
メソッドの概要
 void commit(int reason, int tag)
          キャンバスをコミットします。
 void dispose()
          キャンバスのリソースを破棄します。
 void drawBackground(int x, int y, int width, int height, int totalWidth, int offset, Status status)
          背景を描画します。
 void drawCharWithLtrb(char c, int x, int y, int width, int height, Status status)
          文字を左上右下軸で反転させて描画します。
 void drawImageSync(Graphics g, Image image, int x, int y, int width, int height)
          画像を同期で描画します。
 void drawImageSync(Graphics g, Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2)
          画像を同期で描画します。
 void drawTextTate(char[] values, int[] widths, int[] heights, char[] options, int begin, int end, int x, int y, int width, int indent, Status status)
          文字列を縦に描画します。
 void drawTextWithRight(char[] values, int[] widths, int begin, int end, int x, int y, int width, int height, int indent, Status status)
          文字列を回転させて描画します。
 void resize(int width, int height, int totalWidth)
          キャンバスのサイズを変更します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DRAW_SOKUYOU

public static final char DRAW_SOKUYOU
促音と拗音を表すオプション

関連項目:
定数フィールド値

g

public Graphics g

image

public Image image

itemMap

public ItemMap itemMap

width

public int width

x

public int x
コンストラクタの詳細

Canvas

public Canvas(Drawkit drawkit,
              Status status,
              Canvas prev,
              int width,
              int height,
              int totalWidth)
描画キャンバスを作成します。

パラメータ:
drawkit - ドローキット
status - ステータス
prev - 直前のキャンバス
width - 幅
height - 高さ
totalWidth - 全描画キャンバスの合計幅
メソッドの詳細

commit

public void commit(int reason,
                   int tag)
キャンバスをコミットします。

パラメータ:
reason - コミット事由
tag - タグ

dispose

public void dispose()
キャンバスのリソースを破棄します。


drawBackground

public void drawBackground(int x,
                           int y,
                           int width,
                           int height,
                           int totalWidth,
                           int offset,
                           Status status)
背景を描画します。

パラメータ:
x - X
y - Y
width - 幅
height - 高さ
totalWidth - 全背景の幅
offset - 背景画像のオフセット
status - ステータス

drawCharWithLtrb

public void drawCharWithLtrb(char c,
                             int x,
                             int y,
                             int width,
                             int height,
                             Status status)
文字を左上右下軸で反転させて描画します。

パラメータ:
c - 文字
x - X
y - Y
width - 幅
height - 高さ
status - ステータス

drawImageSync

public void drawImageSync(Graphics g,
                          Image image,
                          int x,
                          int y,
                          int width,
                          int height)
画像を同期で描画します。

パラメータ:
g - グラフィックス
image - 画像
x - X
y - Y
width - 幅
height - 高さ

drawImageSync

public void drawImageSync(Graphics g,
                          Image image,
                          int dx1,
                          int dy1,
                          int dx2,
                          int dy2,
                          int sx1,
                          int sy1,
                          int sx2,
                          int sy2)
画像を同期で描画します。

パラメータ:
g - グラフィックス
image - 画像
dx1 - 描画先の左上の X
dy1 - 描画先の左上の Y
dx2 - 描画先の右下の X
dy2 - 描画先の右下の Y
sx1 - 描画元の左上の X
sy1 - 描画元の左上の Y
sx2 - 描画元の右下の X
sy2 - 描画元の右下の Y

drawTextTate

public void drawTextTate(char[] values,
                         int[] widths,
                         int[] heights,
                         char[] options,
                         int begin,
                         int end,
                         int x,
                         int y,
                         int width,
                         int indent,
                         Status status)
文字列を縦に描画します。

パラメータ:
values - 文字列
widths - 文字の幅
heights - 文字の高さ
options - オプション
begin - バッファの開始位置
end - バッファの終了位置
x - X
y - Y
width - 文字列の最大幅
indent - 各文字のインデント量
status - ステータス

drawTextWithRight

public void drawTextWithRight(char[] values,
                              int[] widths,
                              int begin,
                              int end,
                              int x,
                              int y,
                              int width,
                              int height,
                              int indent,
                              Status status)
文字列を回転させて描画します。

パラメータ:
values - 文字列
widths - 文字の幅
begin - バッファの開始位置
end - バッファの終了位置
x - X
y - Y
width - 回転しない文字列の最大の幅
height - 回転しない文字列の最大の高さ
indent - 各文字のインデント量
status - ステータス

resize

public void resize(int width,
                   int height,
                   int totalWidth)
キャンバスのサイズを変更します。

パラメータ:
width - 幅
height - 高さ
totalWidth - 全描画キャンバスの合計幅

Kagetaka

Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'