クラス MorphImage

java.lang.Object
  上位を拡張 MorphImage

public class MorphImage
extends java.lang.Object

変形イメージクラス


フィールドの概要
protected  java.awt.Color bgColor
          背景色
protected  int figureHeight
          変形対象の高さ
protected  int[] figureWidth
          変形対象の幅
protected  int[] figureX
          変形対象の x 座標
protected  int[] figureY
          変形対象の y 座標
protected  int height
          イメージの高さ
protected  int[] ofset
          ピクセルオフセット
protected  int[] pixel
          画面ピクセルを格納した配列
protected  int width
          イメージの幅
 
コンストラクタの概要
MorphImage(java.awt.Image image, int width, int height, int threshold)
          変形イメージオブジェクトの構築
 
メソッドの概要
 int getBackground()
          背景色を返す
 int getFigureHeight()
          変形対象の高さを返す
 int getFigureWidth(int y)
          変形対象の幅を返す
 int getFigureX(int indexX, int y)
          変形対象の x 座標を返す
 int getFigureY(int index)
          変形対象の y 座標を返す
 int getHeight()
          イメージの高さを返す
protected  int[] getPixel(java.awt.Image image, int width, int height)
          イメージからピクセルデータを取り出す
 int getWidth()
          イメージの幅を返す
protected  void init(int threshold)
          ピクセルデータの初期化
 int pixel(int x, int y)
          ピクセルデータを返す
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

width

protected int width
イメージの幅


height

protected int height
イメージの高さ


pixel

protected int[] pixel
画面ピクセルを格納した配列


figureX

protected int[] figureX
変形対象の x 座標


figureY

protected int[] figureY
変形対象の y 座標


figureWidth

protected int[] figureWidth
変形対象の幅


figureHeight

protected int figureHeight
変形対象の高さ


ofset

protected int[] ofset
ピクセルオフセット


bgColor

protected java.awt.Color bgColor
背景色

コンストラクタの詳細

MorphImage

public MorphImage(java.awt.Image image,
                  int width,
                  int height,
                  int threshold)
変形イメージオブジェクトの構築

パラメータ:
image - ピクセルデータを取り出すイメージ
width - イメージの幅
height - イメージの高さ
threshold - 背景色の閾値
メソッドの詳細

getPixel

protected int[] getPixel(java.awt.Image image,
                         int width,
                         int height)
イメージからピクセルデータを取り出す

パラメータ:
image - ピクセルデータを取り出すイメージ
width - イメージの幅
height - イメージの高さ
戻り値:
ピクセルデータを格納した配列

init

protected void init(int threshold)
ピクセルデータの初期化

パラメータ:
threshold - 背景色の閾値

getWidth

public int getWidth()
イメージの幅を返す

戻り値:
イメージの幅

getHeight

public int getHeight()
イメージの高さを返す

戻り値:
イメージの高さ

pixel

public int pixel(int x,
                 int y)
ピクセルデータを返す

パラメータ:
x - x 座標
y - y 座標
戻り値:
指定された位置のピクセルデータ

getFigureX

public int getFigureX(int indexX,
                      int y)
変形対象の x 座標を返す

パラメータ:
indexX - 変形対象の x 座標を取り出すインデックス
y - イメージの y 座標
戻り値:
指定された位置の変形対象の x 座標

getFigureY

public int getFigureY(int index)
変形対象の y 座標を返す

パラメータ:
index - 変形対象の y 座標を取り出すインデックス
戻り値:
指定された位置の変形対象の y 座標

getFigureWidth

public int getFigureWidth(int y)
変形対象の幅を返す

パラメータ:
y - イメージの y 座標
戻り値:
変形対象の幅

getFigureHeight

public int getFigureHeight()
変形対象の高さを返す

戻り値:
変形対象の高さ

getBackground

public int getBackground()
背景色を返す

戻り値:
背景色