Add FreeBitmap and Update docs

This commit is contained in:
vCaesar 2017-06-03 22:14:36 +08:00
parent 37fb9e6768
commit 80b2a85534
3 changed files with 35 additions and 0 deletions

View File

@ -46,6 +46,7 @@
##### [TostringBitmap](#TostringBitmap)
##### [GetPortion](#GetPortion)
##### [Convert](#Convert)
#### [FreeBitmap](#FreeBitmap)
## [Event](#Event)
@ -398,6 +399,20 @@ robotgo.ScrollMouse(50, "down")
robotgo.Convert("test.png", "test.tif")
```
### <h3 id="FreeBitmap">.FreeBitmap(MMImageType)</h3>
FreeBitmap free and dealloc bitmap
#### Arguments:
MMImageType
#### Examples:
```Go
robotgo.FreeBitmap(bitmap)
```
## <h2 id="Event">Event</h2>
### <h3 id="AddEvent">.AddEvent(string)</h3>

View File

@ -49,6 +49,7 @@
##### [TostringBitmap](#TostringBitmap)
##### [GetPortion](#GetPortion)
##### [Convert](#Convert)
#### [FreeBitmap](#FreeBitmap)
## [事件](#Event)
@ -413,6 +414,20 @@ robotgo.ScrollMouse(50, "down")
```Go
robotgo.Convert("test.png", "test.tif")
```
### <h3 id="FreeBitmap">.FreeBitmap(MMImageType)</h3>
FreeBitmap free and dealloc bitmap
#### 参数:
MMImageType
#### 示例:
```Go
robotgo.FreeBitmap(bitmap)
```
## <h2 id="Event">事件</h2>
### <h3 id="AddEvent">.AddEvent(string)</h3>

View File

@ -639,6 +639,11 @@ func Convert(args ...interface{}) {
SaveBitmap(bitmap, spath, mtype)
}
// FreeBitmap free and dealloc bitmap
func FreeBitmap(ref C.MMBitmapRef) {
C.destroyMMBitmap(ref)
}
/*
___________ ____ _______ .__ __. .___________.
| ____\ \ / / | ____|| \ | | | |