41 #include <visp3/core/vpDisplay.h>
42 #include <visp3/core/vpDisplayException.h>
43 #include <visp3/core/vpImageConvert.h>
45 #include <visp3/core/vpPoint.h>
46 #include <visp3/core/vpMeterPixelConversion.h>
47 #include <visp3/core/vpMath.h>
58 : m_displayHasBeenInitialized(false), m_windowXPosition(0), m_windowYPosition(0),
59 m_width(0), m_height(0), m_title(), m_scale(1), m_scaleType(SCALE_DEFAULT)
67 : m_displayHasBeenInitialized(false), m_windowXPosition(0), m_windowYPosition(0),
68 m_width(0), m_height(0), m_title(), m_scale(1)
253 std::cout <<
"Warning: Cannot apply the down scaling factor " << scale <<
" to the display window since the display is initialized yet..." << std::endl;
265 unsigned int screen_width, screen_height;
266 getScreenSize(screen_width, screen_height);
267 double wscale = std::max(1., ceil(2.*(
double)width / (
double)screen_width));
268 double hscale = std::max(1., ceil(2.*(
double)height / (
double)screen_height));
269 unsigned int scale = (
unsigned int)std::max(1u, std::max((
unsigned int)wscale, (
unsigned int)hscale));
int m_windowYPosition
display position
Class that defines generic functionnalities for display.
unsigned int computeAutoScale(unsigned int width, unsigned int height)
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
virtual void setDownScalingFactor(unsigned int scale)
bool m_displayHasBeenInitialized
display has been initialized
int m_windowXPosition
display position
void setScale(vpScaleType scaleType, unsigned int width, unsigned int height)
static void getImage(const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
vpScaleType
Values that could be applied to a display to down scale the size of the display.
Definition of the vpImage class member functions.