mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
update free bitmap godoc
This commit is contained in:
parent
8319573011
commit
72b9657ffa
@ -255,6 +255,7 @@ func GetXDisplayName() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CaptureScreen capture the screen return bitmap(c struct)
|
// CaptureScreen capture the screen return bitmap(c struct)
|
||||||
|
// use `defer robotgo.FreeBitmap(bitmap)` to free the bitmap
|
||||||
func CaptureScreen(args ...int) C.MMBitmapRef {
|
func CaptureScreen(args ...int) C.MMBitmapRef {
|
||||||
var x, y, w, h C.size_t
|
var x, y, w, h C.size_t
|
||||||
|
|
||||||
@ -797,6 +798,9 @@ func internalFindBitmap(bit, sbit C.MMBitmapRef, tolerance float64) (int, int) {
|
|||||||
//
|
//
|
||||||
// |tolerance| should be in the range 0.0f - 1.0f, denoting how closely the
|
// |tolerance| should be in the range 0.0f - 1.0f, denoting how closely the
|
||||||
// colors in the bitmaps need to match, with 0 being exact and 1 being any.
|
// colors in the bitmaps need to match, with 0 being exact and 1 being any.
|
||||||
|
//
|
||||||
|
// This method only automatically free the internal bitmap,
|
||||||
|
// use `defer robotgo.FreeBitmap(bit)` to free the bitmap
|
||||||
func FindBitmap(bit C.MMBitmapRef, args ...interface{}) (int, int) {
|
func FindBitmap(bit C.MMBitmapRef, args ...interface{}) (int, int) {
|
||||||
var (
|
var (
|
||||||
sbit C.MMBitmapRef
|
sbit C.MMBitmapRef
|
||||||
@ -826,6 +830,8 @@ func FindBitmap(bit C.MMBitmapRef, args ...interface{}) (int, int) {
|
|||||||
//
|
//
|
||||||
// robotgo.FindPic(path string, subbitamp C.MMBitmapRef, tolerance float64)
|
// robotgo.FindPic(path string, subbitamp C.MMBitmapRef, tolerance float64)
|
||||||
//
|
//
|
||||||
|
// This method only automatically free the internal bitmap,
|
||||||
|
// use `defer robotgo.FreeBitmap(bit)` to free the bitmap
|
||||||
func FindPic(path string, args ...interface{}) (int, int) {
|
func FindPic(path string, args ...interface{}) (int, int) {
|
||||||
var (
|
var (
|
||||||
sbit C.MMBitmapRef
|
sbit C.MMBitmapRef
|
||||||
|
Loading…
Reference in New Issue
Block a user