浏览代码

added clone()

ncannasse 11 年之前
父节点
当前提交
c25e76d533
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hxd/BitmapData.hx

+ 4 - 0
hxd/BitmapData.hx

@@ -126,6 +126,10 @@ abstract BitmapData(InnerData) {
 		this.dispose();
 		#end
 	}
+
+	public function clone() {
+		return sub(0,0,width,height);
+	}
 	
 	public function sub( x, y, w, h ) : BitmapData {
 		#if flash