40 #include <visp3/core/vpDisplay.h>
41 #include <visp3/core/vpDisplayException.h>
42 #include <visp3/core/vpImageConvert.h>
44 #include <visp3/core/vpMath.h>
45 #include <visp3/core/vpMeterPixelConversion.h>
46 #include <visp3/core/vpPoint.h>
53 : m_displayHasBeenInitialized(false), m_windowXPosition(0), m_windowYPosition(0), m_width(0), m_height(0), m_title(),
54 m_scale(1), m_scaleType(SCALE_DEFAULT)
61 : m_displayHasBeenInitialized(d.m_displayHasBeenInitialized), m_windowXPosition(d.m_windowXPosition),
62 m_windowYPosition(d.m_windowYPosition), m_width(d.m_width), m_height(d.m_height), m_title(d.m_title),
63 m_scale(d.m_scale), m_scaleType(d.m_scaleType)
239 std::cout <<
"Warning: Cannot apply the down scaling factor " << scale
240 <<
" to the display window since the display is initialized yet..." << std::endl;
251 unsigned int screen_width, screen_height;
252 getScreenSize(screen_width, screen_height);
253 double wscale = std::max<double>(1., ceil((2. *
static_cast<double>(width)) /
static_cast<double>(screen_width)));
254 double hscale = std::max<double>(1., ceil((2. *
static_cast<double>(height)) /
static_cast<double>(screen_height)));
255 unsigned int scale = std::max<unsigned int>(1u, std::max<unsigned int>(
static_cast<unsigned int>(wscale),
static_cast<unsigned int>(hscale)));
300 std::cout <<
"undefined scaleType" << std::endl;
Class that defines generic functionalities for display.
virtual void setDownScalingFactor(unsigned int scale)
static void getImage(const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
bool m_displayHasBeenInitialized
display has been initialized
unsigned int computeAutoScale(unsigned int width, unsigned int height)
void setScale(vpScaleType scaleType, unsigned int width, unsigned int height)
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)