 
namespace gdip;

//创建类
class path {
	ctor(arg){
		if(type(arg) == type.number){
			 this.pPath = gdip.assert(  gdip.CreatePath (arg )  )    
		}
		
		if(!this.pPath)
			error("参数必须是字符串(图片文件路径或内容)",2)
	
	}

@metaProperty//元表指向属性表
}

namespace path{
gdip = ..gdip;

import util.metaProperty;//导入属性表支持库
metaProperty = util.metaProperty(

	 
	
	addstring = function( str,family,style,emSize,rclayout,strformat ){
		gdip.assert(gdip.AddPathString( owner[["pPath"]],..string.toUnicode(str), -1, family, style, emSize, rclayout, strformat)
		);
		
	}
	addstringI = function( str,family,style,emSize,rclayout,strformat ){
		gdip.assert(
			gdip.AddPathStringI( owner[["pPath"]],..string.toUnicode(str), -1, family, style, emSize, rclayout, strformat)
		);
	}
	delete = function(){
		gdip.DeletePath(owner[["pPath"]])
		owner[["pPath"]] = null;//让破他的函数都用不了
	}
	
	//自动转换为API指针
	_topointer = function(){
		return owner[["pPath"]];
	}
) 



}
 
/**intellisense()
gdip.image("__/*请输入文件路径\n或图片数据*/") = 创建GDI+L图片对象
!gdipimage.width = 宽度
!gdipimage.graphics  = 从图像创建画布
!gdipimage.height = 高度
!gdipimage.save("__/*请输入文件路径*/") = 保存文件
!gdipimage.dispose() = 释放图像
?gdip.image = !gdipimage.
end intellisense**/
