import Canvas;
import awt.Graphics;
import awt.Color;
import awt.Image;

/**
 マウスの操作で絵にいたずら書きをする Rakugaki のクラス定義
 */
class Rakugaki extends Canvas {

/**
 背景に使用する画像
 */
       private Image backImage = null;

/**
 初期設定を行う。背景の絵を読み込み、それに合わせてサイズの設定。
 */
       protected void init() {

             String imageSource = getAttribute("image");
             if( imageSource == null ) {
                    imageSource = "/hokusei/staff/fujiki.gif";
             }
             backImage = getImage( imageSource );

             resize( backImage.width, backImage.height );
       }

/**
 アプレットの初期状態としてイメージを表示する。
 */
       public void paint( Graphics g ) {

             g.drawImage( backImage, 0, 0 );
       }
}

