텍스트 » Api
  
getimageinfo
  
Description
image속성에 설정된 이미지 정보를 담고 있는 Class(Remark참조)를 반환합니다.
해당 클래스에는 이미지에 대한 정보가 담겨 있고 cloneimage API와 함께 사용하여
텍스트간 이미지를 서로 복사 할 경우에도 사용됩니다.
  
  
Return Value
  
    
      | Type | 
      Description | 
    
  
  
    
      | class | 
      이미지 정보를 담고 있는 Class [Remark참조] | 
    
  
Remark
파라미터 clsImageInfo 의 클래스 정의
classImageInfo = function() 
{
	// 이미지 경로
	this.strpath = "";
	// 이미지 넓이
	this.nwdith = 0;
	// 이미지 높이
	this.nheight = 0;
	// 이미지 분할옵션일때 왼쪽 이미지 크기
	this.nleftpiece = 0;
	// 이미지 분할옵션일때 오른쪽 이미지 크기
	this.nrightpiece = 0;
	// 이미지를 정상적으로 읽어서 이미지 데이터를 가지고 있는지 여부
	this.bhasimagedata = false;
}
  
 
  
Example
function screen_on_load()
{
	// 10개의 텍스트를 동적으로 생성하여 화면에 보여주는 예제
	var clsImageInfo = null;
	var nLeft = 10, nTop = 10;
	for(var nCount = 0;nCount < 10;nCount++) {
		var instTxt = screen.createobject(XFD_CTRLKIND_HYPERTEXT, nLeft, nTop, 100, 20, "");
		instTxt.settext("text" + nCount);
		if(nCount == 0) {
			instTxt.setimage("/정보공통down.gif");
			// 속도를 빠르게 하게 위해 
			// 첫번째 텍스트에 설정된 이미지 정보를 별도로 저장해둔다.
			// 두번째 텍스트부터는 해당 이미지 정보로 이미지를 복사하게 한다.
			clsImageInfo = instTxt.getimageinfo();
			if(clsImageInfo == null) {
				break;
			}
			factory.consoleprint("path : " + clsImageInfo.strpath);
			factory.consoleprint("width : " + clsImageInfo.nwdith);
			factory.consoleprint("height : " + clsImageInfo.nheight);
			factory.consoleprint("nleftpiece : " + clsImageInfo.nleftpiece);
			factory.consoleprint("nrightpiece : " + clsImageInfo.nrightpiece);
		} else {
			// 이미지 복사
			instTxt.cloneimage(clsImageInfo);
		}
		nLeft += 100 + 5;
		if(screen.getscreenwidth() <= nLeft) {
			nTop += 20 + 5;
			nLeft = 10;
		}
	}
}
  
Viewer Ver.
9.1.1.1
  
Update Date
 20210804