LboxGd


  Line



スタイルを使用した直線(つまり点線)を引くサンプル
  
int b,w;
b = Gd->CreateColor( 0, 0, 0 );
w = Gd->CreateColor( 255, 255, 255 );
int s[10];
s[0] = b;
s[1] = b;
s[2] = b;
s[3] = b;
s[4] = b;
s[5] = w;
s[6] = w;
s[7] = w;
s[8] = w;
s[9] = w;
Gd->SetStyle( s, 10 ); // 10 は配列数
Gd->Line( 0, 0, 100, 100 );
  

  
// *********************************************************
// 直線の描画
// 戻り値 : true 成功, false 失敗
// *********************************************************
// スタイル使用
int LboxGd::Line( int x1, int y1, int x2, int y2 )
{
	if ( this->lib == NULL ) {
		this->SetLibLoadErrorMessage();
		return false;
	}

	LPFUNC_gdImageLine Dll_gdImageLine;

	Dll_gdImageLine =
		(LPFUNC_gdImageLine)GetProcAddress(
			lib, "gdImageLine@24"
		);
	if ( Dll_gdImageLine == NULL ) {
		this->SetFuncLoadErrorMessage();
		return false;
	}

	gdImagePtr im;

	im = (gdImagePtr)(this->gd);

	Dll_gdImageLine(im, x1, y1, x2, y2, gdStyled );

	return true;
}
// 色使用
int LboxGd::Line( int x1, int y1, int x2, int y2, int color )
{
	if ( this->lib == NULL ) {
		this->SetLibLoadErrorMessage();
		return false;
	}

	LPFUNC_gdImageLine Dll_gdImageLine;

	Dll_gdImageLine =
		(LPFUNC_gdImageLine)GetProcAddress(
			lib, "gdImageLine@24"
		);
	if ( Dll_gdImageLine == NULL ) {
		this->SetFuncLoadErrorMessage();
		return false;
	}

	gdImagePtr im;

	im = (gdImagePtr)(this->gd);

	Dll_gdImageLine(im, x1, y1, x2, y2, color );

	return true;
}
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ