34 #include <visp3/core/vpConfig.h>
36 #if (defined(VISP_HAVE_GDI) || defined(VISP_HAVE_D3D9))
38 #ifndef vpDisplayWin32_hh
39 #define vpDisplayWin32_hh
43 #include <visp3/core/vpDisplay.h>
44 #include <visp3/core/vpImage.h>
48 #include <visp3/core/vpImagePoint.h>
49 #include <visp3/core/vpRect.h>
50 #include <visp3/gui/vpWin32Renderer.h>
51 #include <visp3/gui/vpWin32Window.h>
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
112 friend void vpCreateWindow(threadParam *param);
124 void closeDisplay()
override;
129 unsigned int height)
override;
132 void flushDisplay()
override;
133 void flushDisplayROI(
const vpImagePoint &iP,
unsigned int width,
unsigned int height)
override;
136 unsigned int getScreenHeight()
override;
137 void getScreenSize(
unsigned int &width,
unsigned int &height)
override;
138 unsigned int getScreenWidth()
override;
140 void init(
vpImage<unsigned char> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"")
override;
141 void init(
vpImage<vpRGBa> &I,
int winx = -1,
int winy = -1,
const std::string &title =
"")
override;
142 void init(
unsigned int width,
unsigned int height,
int winx = -1,
int winy = -1,
const std::string &title =
"")
override;
144 void setFont(
const std::string &fontname)
override;
147 window.setScale(scale);
151 void setTitle(
const std::string &windowtitle)
override;
156 unsigned int w = 4,
unsigned int h = 2,
unsigned int thickness = 1)
override;
159 unsigned int thickness = 1)
override;
164 unsigned int thickness = 1)
override;
171 bool fill =
false,
unsigned int thickness = 1)
override;
173 bool fill =
false,
unsigned int thickness = 1)
override;
178 bool getClick(
bool blocking =
true)
override;
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 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)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
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.