mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 07:33:55 +00:00
commit
feb6b7ef0a
12
robotgo.go
12
robotgo.go
@ -99,8 +99,8 @@ type Bitmap struct {
|
|||||||
|
|
||||||
// MPoint is MPoint struct
|
// MPoint is MPoint struct
|
||||||
type MPoint struct {
|
type MPoint struct {
|
||||||
x int
|
X int
|
||||||
y int
|
Y int
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try handler(err)
|
// Try handler(err)
|
||||||
@ -1068,8 +1068,8 @@ func FindEveryBitmap(bit C.MMBitmapRef, args ...interface{}) (posArr []MPoint) {
|
|||||||
gSlice := (*[(1 << 28) - 1]C.MMPoint)(unsafe.Pointer(cArray))[:cSize:cSize]
|
gSlice := (*[(1 << 28) - 1]C.MMPoint)(unsafe.Pointer(cArray))[:cSize:cSize]
|
||||||
for i := 0; i < len(gSlice); i++ {
|
for i := 0; i < len(gSlice); i++ {
|
||||||
posArr = append(posArr, MPoint{
|
posArr = append(posArr, MPoint{
|
||||||
x: int(gSlice[i].x),
|
X: int(gSlice[i].x),
|
||||||
y: int(gSlice[i].y),
|
Y: int(gSlice[i].y),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1363,8 +1363,8 @@ func FindEveryColor(color CHex, args ...interface{}) (posArr []MPoint) {
|
|||||||
gSlice := (*[(1 << 28) - 1]C.MMPoint)(unsafe.Pointer(cArray))[:cSize:cSize]
|
gSlice := (*[(1 << 28) - 1]C.MMPoint)(unsafe.Pointer(cArray))[:cSize:cSize]
|
||||||
for i := 0; i < len(gSlice); i++ {
|
for i := 0; i < len(gSlice); i++ {
|
||||||
posArr = append(posArr, MPoint{
|
posArr = append(posArr, MPoint{
|
||||||
x: int(gSlice[i].x),
|
X: int(gSlice[i].x),
|
||||||
y: int(gSlice[i].y),
|
Y: int(gSlice[i].y),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user