diff --git a/bitmap/goBitmap.h b/bitmap/goBitmap.h index 66ea9c8..f50bab2 100644 --- a/bitmap/goBitmap.h +++ b/bitmap/goBitmap.h @@ -54,6 +54,10 @@ bool bitmap_copy_to_pboard(MMBitmapRef bitmap){ return true; } +MMBitmapRef bitmap_deepcopy(MMBitmapRef bitmap){ + return bitmap == NULL ? NULL : copyMMBitmap(bitmap); +} + MMPoint aFindBitmap(MMBitmapRef bit_map, MMRect rect){ // MMRect rect; // rect.size.width = 10; diff --git a/robotgo.go b/robotgo.go index e2b1554..59859df 100644 --- a/robotgo.go +++ b/robotgo.go @@ -680,6 +680,12 @@ func CopyBitpb(bitmap C.MMBitmapRef) bool { return gbool } +// DeepCopyBit deep copy bitmap +func DeepCopyBit(bitmap C.MMBitmapRef) C.MMBitmapRef { + bit := C.bitmap_deepcopy(bitmap) + return bit +} + /* ___________ ____ _______ .__ __. .___________. | ____\ \ / / | ____|| \ | | | |