Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Jan 2, 2022
1 parent cc2d019 commit ca337b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
34 changes: 0 additions & 34 deletions cmd/color-pos/main.go

This file was deleted.

6 changes: 4 additions & 2 deletions examples/scale/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ func main() {
fmt.Println("get scale screen size: ", width, height)

bitmap := robotgo.CaptureScreen(0, 0, width, height)
robotgo.SaveBitmap(bitmap, "test.png")
// robotgo.SaveBitmap(bitmap, "test.png")
robotgo.Save(robotgo.ToImage(bitmap), "test.png")

sx := robotgo.ScaleX()
s := robotgo.Scale()
Expand All @@ -27,7 +28,8 @@ func main() {
rx, ry, rw, rh := sx, sy, robotx, roboty
// bit1 := robotgo.CaptureScreen(10, 20, robotw, roboth)
bit1 := robotgo.CaptureScreen(rx, ry, rw, rh)
robotgo.SaveBitmap(bit1, "test2.png")
// robotgo.SaveBitmap(bit1, "test2.png")
robotgo.Save(robotgo.ToImage(bit1), "test2.png")

clo := robotgo.GetPixelColor(robotx, roboty)
fmt.Println("GetPixelColor...", clo)
Expand Down
2 changes: 1 addition & 1 deletion examples/screen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func bitmap() {
fmt.Println("GoCaptureScreen...", gbitMap.Width)
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)

robotgo.SaveCapture("saveCapture.png", 10, 20, 100, 100)
// robotgo.SaveCapture("saveCapture.png", 10, 20, 100, 100)
}

func color() {
Expand Down

0 comments on commit ca337b8

Please sign in to comment.