-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMouseMoveChessOpt.h
44 lines (35 loc) · 1006 Bytes
/
MouseMoveChessOpt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by litm on 2020/3/14.
//
#ifndef JUMP0_MOUSEMOVECHESSOPT_H
#define JUMP0_MOUSEMOVECHESSOPT_H
#include "ChessInclude.h"
using namespace cv;
using namespace std;
class MouseMoveChessOpt {
public:
void on_MouseHandle(int event,int x, int y ,int flags,void* param);
void on_MouseHandle_test(int event,int x, int y ,int flags,void* param);
void DrawRectangle(Mat img, Rect box,bool flag= true);
void ShowHelpText();
void showWindows_test();
MouseMoveChessOpt(){
curMousePos.x =0;
curMousePos.y =0;
g_bDrawingBox = false;
}
public:
Rect g_rectangle,g_old_rectangle;
bool g_bDrawingBox;
RNG g_rng;
Point curMousePos;
};
struct WrapMouseOpt{
MouseMoveChessOpt *optthis;
Mat image;
};
static void onMouseHandleGlobal(int event,int x, int y ,int flags,void* param){
WrapMouseOpt *opt = (WrapMouseOpt*) param;
opt->optthis->on_MouseHandle(event,x,y,flags,&opt->image);
}
#endif //JUMP0_MOUSEMOVECHESSOPT_H