39 #include <visp3/core/vpConfig.h>
41 #if (defined(VISP_HAVE_GDI) || defined(VISP_HAVE_D3D9))
43 #ifndef vpDisplayWin32_hh
44 #define vpDisplayWin32_hh
48 #include <visp3/core/vpDisplay.h>
49 #include <visp3/core/vpImage.h>
53 #include <visp3/core/vpImagePoint.h>
54 #include <visp3/core/vpRect.h>
55 #include <visp3/gui/vpWin32Renderer.h>
56 #include <visp3/gui/vpWin32Window.h>
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
118 friend void vpCreateWindow(threadParam *param);
135 unsigned int height);
139 void flushDisplayROI(
const vpImagePoint &iP,
unsigned int width,
unsigned int height);
142 unsigned int getScreenHeight();
143 void getScreenSize(
unsigned int &width,
unsigned int &height);
144 unsigned int getScreenWidth();
147 void init(
vpImage<vpRGBa> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"");
148 void init(
unsigned int width,
unsigned int height,
int winx = -1,
int winy = -1,
const std::string &title =
"");
150 void setFont(
const std::string &fontname);
153 window.setScale(scale);
157 void setTitle(
const std::string &windowtitle);
162 unsigned int w = 4,
unsigned int h = 2,
unsigned int thickness = 1);
167 unsigned int thickness = 1);
172 unsigned int thickness = 1);
179 bool fill =
false,
unsigned int thickness = 1);
181 bool fill =
false,
unsigned int thickness = 1);
184 bool getClick(
bool blocking =
true);
Class to define RGB colors available for display functionalities.
static const vpColor white
static const vpColor green
Base abstract class for Windows 32 displays. Implements the window creation in a separate thread and ...
DWORD threadId
Id of the window's thread.
vpWin32Window window
The window.
void setDownScalingFactor(vpScaleType scaleType)
vpDisplayWin32(vpImage< vpRGBa > &I, int winx=-1, int winy=-1, const std::string &title="")
vpDisplayWin32(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
HANDLE hThread
Handle of the window's thread.
bool iStatus
Initialization status.
static const int MAX_INIT_DELAY
Maximum delay for window initialization.
void setDownScalingFactor(unsigned int scale)
Class that defines generic functionalities for display.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void displayCircle(const vpImage< unsigned char > &I, const vpImageCircle &circle, const vpColor &color, bool fill=false, unsigned int thickness=1)
static bool getKeyboardEvent(const vpImage< unsigned char > &I, bool blocking=true)
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void getImage(const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
static bool getClickUp(const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void displayCharString(const vpImage< unsigned char > &I, const vpImagePoint &ip, const char *string, const vpColor &color)
static void setTitle(const vpImage< unsigned char > &I, const std::string &windowtitle)
static void displayArrow(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
static void displayPoint(const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
static void setFont(const vpImage< unsigned char > &I, const std::string &font)
static void displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
static bool getPointerPosition(const vpImage< unsigned char > &I, vpImagePoint &ip)
static bool getPointerMotionEvent(const vpImage< unsigned char > &I, vpImagePoint &ip)
static void displayRectangle(const vpImage< unsigned char > &I, const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
static void setWindowPosition(const vpImage< unsigned char > &I, int winx, int winy)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Defines a rectangle in the plane.