 
namespace gdip ;
 
//创建类
class family {
	ctor(name,collection=0){
		if(type(name) == type.string){ 
			 this.pFamily = gdip.assert(  gdip.CreateFontFamilyFromName ( ..string.toUnicode(name),collection)   )    
		}
		
		if(!this.pFamily)
			error("参数错误",2)
	
	}

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

namespace family{

	gdip = ..gdip;
	
	import util.metaProperty;//导入属性表支持库
	metaProperty = util.metaProperty(
	
	 	createFont = function( emSize,style,unit ){
			return gdip.assert(  gdip.CreateFont(owner[["pFamily"]],emSize,style,unit) ); 
		}
	 	
		delete = function(){
			gdip.DeleteFontFamily(owner[["pFamily"]])
			owner[["pFamily"]] = null;//让破他的函数都用不了
		}
		
		//自动转换为API指针
		_topointer = function(){
			return owner[["pFamily"]];
		}
	) 


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