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
65 vpDisplayWin32 *vpDisp;
135 unsigned int height);
143 void getScreenSize(
unsigned int &width,
unsigned int &height);
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);
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
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
DWORD threadId
Id of the window's thread.
vpWin32Window window
The window.
vpDisplayWin32(vpWin32Renderer *rend=NULL)
unsigned int getScreenWidth()
void clearDisplay(const vpColor &color=vpColor::white)
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="")
unsigned int getScreenHeight()
HANDLE hThread
Handle of the window's thread.
friend void vpCreateWindow(threadParam *param)
Function used to launch the window in a thread.
bool iStatus
Initialization status.
void flushDisplayROI(const vpImagePoint &iP, unsigned int width, unsigned int height)
flush the Win32 buffer It's necessary to use this function to see the results of any drawing
static const int MAX_INIT_DELAY
Maximum delay for window initialization.
void displayImageROI(const vpImage< unsigned char > &I, const vpImagePoint &iP, unsigned int width, unsigned int height)
void getScreenSize(unsigned int &width, unsigned int &height)
void flushDisplay()
flush the Win32 buffer It's necessary to use this function to see the results of any drawing
void setDownScalingFactor(unsigned int scale)
void displayImage(const vpImage< vpRGBa > &I)
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 ...
Definition of the vpImage class member functions.
Defines a rectangle in the plane.