41 #include <visp3/core/vpConfig.h>
42 #include <visp3/core/vpDisplay.h>
48 #include <X11/Xutil.h>
57 # undef Success // See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=253
60 #include <visp3/core/vpImage.h>
61 #include <visp3/core/vpRect.h>
164 unsigned long *x_color;
165 unsigned int screen_depth ;
166 unsigned short colortable[256];
169 bool ximage_data_init;
170 unsigned int RMask, GMask, BMask;
171 int RShift, GShift, BShift;
190 vpDisplayX(
int winx,
int winy,
const std::string &title=
"") ;
199 unsigned int getScreenDepth();
200 unsigned int getScreenHeight();
201 void getScreenSize(
unsigned int &width,
unsigned int &height);
202 unsigned int getScreenWidth();
205 void init(
vpImage<vpRGBa> &I,
int winx=-1,
int winy=-1,
const std::string &title=
"") ;
206 void init(
unsigned int width,
unsigned int height,
int winx=-1,
int winy=-1,
const std::string &title=
"") ;
211 void closeDisplay() ;
215 unsigned int thickness=1) ;
221 const vpColor &color,
bool fill =
false,
unsigned int thickness=1);
223 const vpColor &color,
unsigned int thickness=1) ;
229 void displayImage(
const unsigned char *I) ;
235 const vpColor &color,
unsigned int thickness=1) ;
239 const vpColor &color,
bool fill =
false,
unsigned int thickness=1) ;
241 const vpColor &color,
bool fill =
false,
unsigned int thickness=1) ;
243 unsigned int thickness=1) ;
245 void flushDisplay() ;
246 void flushDisplayROI(
const vpImagePoint &iP,
const unsigned int width,
const unsigned int height);
256 int getMsb(
unsigned int u32val);
260 void setFont(
const std::string &font);
261 void setTitle(
const std::string &title) ;
Class that defines generic functionnalities for display.
static bool getPointerPosition(const vpImage< unsigned char > &I, vpImagePoint &ip)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static bool getPointerMotionEvent(const vpImage< unsigned char > &I, vpImagePoint &ip)
Class to define colors available for display functionnalities.
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
static bool getClickUp(const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
static void displayPoint(const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
static const vpColor green
static void setFont(const vpImage< unsigned char > &I, const std::string &font)
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 display(const vpImage< unsigned char > &I)
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 getImage(const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
static void displayCircle(const vpImage< unsigned char > &I, const vpImagePoint ¢er, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void setWindowPosition(const vpImage< unsigned char > &I, int winx, int winy)
vpScaleType
Values that could be applied to a display to down scale the size of the display.
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
static bool getKeyboardEvent(const vpImage< unsigned char > &I, bool blocking=true)
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 const vpColor white
static void displayDotLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)