35 #include <visp3/core/vpConfig.h>
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #include <visp3/gui/vpDisplayD3D.h>
40 #include <visp3/gui/vpDisplayGDI.h>
41 #include <visp3/gui/vpDisplayGTK.h>
42 #include <visp3/gui/vpDisplayOpenCV.h>
43 #include <visp3/gui/vpDisplayX.h>
44 #include <visp3/gui/vpPlotCurve.h>
46 #if defined(VISP_HAVE_DISPLAY)
47 vpPlotCurve::vpPlotCurve()
48 : color(
vpColor::red), curveStyle(point), thickness(1), nbPoint(0), lastPoint(), pointListx(), pointListy(),
49 pointListz(), legend(), xmin(0), xmax(0), ymin(0), ymax(0)
52 vpPlotCurve::~vpPlotCurve()
66 #if defined(VISP_HAVE_DISPLAY)
72 if (iP.
get_i() <= lastPoint.get_i()) {
74 height = lastPoint.get_i() - top + 10;
77 top = lastPoint.get_i() - 5;
78 height = iP.
get_i() - top + 10;
80 if (iP.
get_j() <= lastPoint.get_j()) {
81 left = iP.
get_j() - 5;
82 width = lastPoint.get_j() - left + 10;
85 left = lastPoint.get_j() - 5;
86 width = iP.
get_j() - left + 10;
91 pointListx.push_back(x);
92 pointListy.push_back(y);
93 pointListz.push_back(0.0);
96 void vpPlotCurve::plotList(
const vpImage<unsigned char> &I,
double xorg,
double yorg,
double zoomx,
double zoomy)
98 std::list<double>::const_iterator it_ptListx = pointListx.begin();
99 std::list<double>::const_iterator it_ptListy = pointListy.begin();
103 while (k < nbPoint) {
104 iP.
set_ij(yorg - (zoomy * (*it_ptListy)), xorg + (zoomx * (*it_ptListx)));
117 #elif !defined(VISP_BUILD_SHARED_LIBS)
119 void dummy_vpPlotCurve() { };
Class to define RGB colors available for display functionalities.
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 flushROI(const vpImage< unsigned char > &I, const vpRect &roi)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void set_ij(double ii, double jj)
Defines a rectangle in the plane.