Browse Source

added clone()

ncannasse 11 years ago
parent
commit
c25e76d533
1 changed files with 4 additions and 0 deletions
  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