Browse Source

added clone()

ncannasse 11 năm trước cách đây
mục cha
commit
c25e76d533
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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