mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 17:59:12 +00:00
update code style
This commit is contained in:
parent
99549e7b57
commit
1d8be2ad3e
2 changed files with 2 additions and 12 deletions
|
|
@ -18,17 +18,6 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// class BMP
|
||||
// {
|
||||
// public:
|
||||
// size_t width;
|
||||
// size_t height;
|
||||
// size_t byteWidth;
|
||||
// uint8_t bitsPerPixel;
|
||||
// uint8_t bytesPerPixel;
|
||||
// uint8_t *image;
|
||||
// };
|
||||
|
||||
/* Returns false and sets error if |bitmap| is NULL. */
|
||||
bool bitmap_ready(MMBitmapRef bitmap){
|
||||
if (bitmap == NULL || bitmap->imageBuffer == NULL) {
|
||||
|
|
@ -68,7 +57,7 @@ MMPoint find_bitmap(MMBitmapRef bitmap, MMBitmapRef sbit, float tolerance){
|
|||
}
|
||||
|
||||
MMRect rect = MMBitmapGetBounds(sbit);
|
||||
// printf("x=%d,y=%d,width=%d,height=%d\n", rect.origin.x,
|
||||
// printf("x=%d, y=%d, width=%d, height=%d\n", rect.origin.x,
|
||||
// rect.origin.y, rect.size.width, rect.size.height);
|
||||
|
||||
if (findBitmapInRect(bitmap, sbit, &point,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ func main() {
|
|||
s := robotgo.Scale()
|
||||
robotx := 35 * s / 100
|
||||
roboty := 25 * s / 100
|
||||
|
||||
bit1 := robotgo.CaptureScreen(0, 0, robotx, roboty)
|
||||
robotgo.SaveBitmap(bit1, "test2.png")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue