open method

bool open(
  1. List<int> image,
  2. int offset,
  3. int width,
  4. int height,
  5. bool initWindow, [
  6. bool rgbFlag = false,
])

Implementation

bool open( List<int> image, int offset, int width, int height, bool initWindow, [bool rgbFlag = false] ){
	// イメージを開放する
	_dispose();

	if( (width <= 0) || (height <= 0) ){
		return false;
	}

	// イメージを登録する
	_image      = image;
	_offset     = offset;
	_width      = width;
	_height     = height;
	_createFlag = false;
	_rgbFlag    = rgbFlag;

	// ウィンドウ情報
	if( initWindow ){
		setWindow( 0.0, 0.0, 1.0, 1.0 );
	} else {
		// 現在点を更新する
		_wndMoveX = wndPosX( _imgMoveX );
		_wndMoveY = wndPosY( _imgMoveY );
	}

	// イメージをクリアする
	clear( 0 );

	return true;
}