39 #include <visp3/core/vpDisplay.h>
41 #include "vpDisplay_impl.h"
62 const vpColor &color,
unsigned int w,
unsigned int h,
unsigned int thickness)
64 vp_display_display_arrow(I, ip1, ip2, color, w, h, thickness);
78 unsigned int w,
unsigned int h,
unsigned int thickness)
80 vp_display_display_arrow(I, i1, j1, i2, j2, color, w, h, thickness);
99 vp_display_display_camera(I, cMo, cam, size, color, thickness);
118 vp_display_display_char_string(I, ip,
string, color);
137 vp_display_display_char_string(I, i, j,
string, color);
151 const vpColor &color,
bool fill,
unsigned int thickness)
153 vp_display_display_circle(I, center, radius, color, fill, thickness);
167 bool fill,
unsigned int thickness)
169 vp_display_display_circle(I, i, j, radius, color, fill, thickness);
181 const vpColor &color,
unsigned int thickness)
183 vp_display_display_cross(I, ip, size, color, thickness);
195 unsigned int thickness)
197 vp_display_display_cross(I, i, j, size, color, thickness);
208 const vpColor &color,
unsigned int thickness)
210 vp_display_display_dot_line(I, ip1, ip2, color, thickness);
222 unsigned int thickness)
224 vp_display_display_dot_line(I, i1, j1, i2, j2, color, thickness);
237 bool closeTheShape,
const vpColor &color,
unsigned int thickness)
242 for (
size_t i = 0; i < ips.size() - 1; i++)
243 vp_display_display_dot_line(I, ips[i], ips[i + 1], color, thickness);
246 vp_display_display_dot_line(I, ips.front(), ips.back(), color, thickness);
300 const double &coef2,
const double &coef3,
bool use_centered_moments,
301 const vpColor &color,
unsigned int thickness)
363 const double &coef2,
const double &coef3,
const double &theta1,
const double &theta2,
364 bool use_centered_moments,
const vpColor &color,
unsigned int thickness)
366 vp_display_display_ellipse(I, center, coef1, coef2, coef3, theta1, theta2, use_centered_moments, color, thickness);
388 vp_display_display_frame(I, cMo, cam, size, color, thickness, offset);
401 const vpColor &color,
unsigned int thickness,
bool segment)
403 displayLine(I, static_cast<int>(ip1.
get_i()), static_cast<int>(ip1.
get_j()), static_cast<int>(ip2.
get_i()), static_cast<int>(ip2.
get_j()), color, thickness, segment);
417 unsigned int thickness,
bool segment)
420 vp_display_display_line(I, i1, j1, i2, j2, color, thickness);
424 double delta_j = static_cast<double>(j2) - static_cast<double>(j1);
425 double delta_i = static_cast<double>(i2) - static_cast<double>(i1);
427 if (std::fabs(delta_i) <= std::numeric_limits<double>::epsilon()) {
428 vp_display_display_line(I, i1, 0, i1, (I.
getWidth()-1), color, thickness);
431 else if (std::fabs(delta_j) <= std::numeric_limits<double>::epsilon()) {
432 vp_display_display_line(I, 0, j1, (I.
getHeight()-1), j1, color, thickness);
435 double a = delta_i / delta_j;
436 double b = static_cast<double>(i1) - a * static_cast<double>(j1);
437 std::vector<vpImagePoint> vip;
440 if (ip_left.get_i() >= 0. && ip_left.get_i() <= (I.
getHeight()-1.)) {
441 vip.push_back(ip_left);
445 if (ip_right.get_i() >= 0. && ip_right.get_i() <= (I.
getHeight()-1.)) {
446 vip.push_back(ip_right);
448 if (vip.size() == 2) {
449 vp_display_display_line(I, vip[0], vip[1], color, thickness);
454 if (ip_top.get_j() >= 0. && ip_top.get_j() <= (I.
getWidth()-1.)) {
455 vip.push_back(ip_top);
457 if (vip.size() == 2) {
458 vp_display_display_line(I, vip[0], vip[1], color, thickness);
463 if (ip_bottom.get_j() >= 0. && ip_bottom.get_j() <= (I.
getWidth()-1.)) {
464 vip.push_back(ip_bottom);
466 if (vip.size() == 2) {
467 vp_display_display_line(I, vip[0], vip[1], color, thickness);
482 bool closeTheShape,
const vpColor &color,
unsigned int thickness)
487 for (
size_t i = 0; i < ips.size() - 1; i++)
488 vp_display_display_line(I, ips[i], ips[i + 1], color, thickness);
491 vp_display_display_line(I, ips.front(), ips.back(), color, thickness);
502 unsigned int thickness)
504 vp_display_display_point(I, ip, color, thickness);
515 unsigned int thickness)
517 vp_display_display_point(I, i, j, color, thickness);
529 const vpColor &color,
unsigned int thickness,
bool closed)
531 vp_display_display_polygon(I, vip, color, thickness, closed);
549 unsigned int height,
const vpColor &color,
bool fill,
unsigned int thickness)
551 vp_display_display_rectangle(I, topLeft, width, height, color, fill, thickness);
569 const vpColor &color,
bool fill,
unsigned int thickness)
571 vp_display_display_rectangle(I, i, j, width, height, color, fill, thickness);
588 bool fill,
unsigned int thickness)
590 vp_display_display_rectangle(I, rectangle, color, fill, thickness);
607 unsigned int width,
unsigned int height,
const vpColor &color,
unsigned int thickness)
609 vp_display_display_rectangle(I, center, angle, width, height, color, thickness);
628 unsigned int thickness)
630 vp_display_display_rectangle(I, topLeft, bottomRight, color, fill, thickness);
647 unsigned int width,
unsigned int height,
const vpColor &color,
unsigned int thickness)
649 vp_display_display_rectangle(I, i, j, angle, width, height, color, thickness);
667 vp_display_display_text(I, ip, s, color);
684 vp_display_display_text(I, i, j, s, color);
787 return vp_display_get_click(I, ip, blocking);
813 return vp_display_get_click(I, ip, button, blocking);
861 return vp_display_get_click_up(I, ip, button, blocking);
971 return vp_display_get_keyboard_event(I, blocking);
1062 return vp_display_get_keyboard_event(I, key, blocking);
1153 return vp_display_get_keyboard_event(I, key, blocking);
1167 return vp_display_get_pointer_motion_event(I, ip);
1181 return vp_display_get_pointer_position(I, ip);
1195 vp_display_set_background(I, color);
1213 vp_display_set_font(I, fontname);
1225 vp_display_set_title(I, windowtitle);
1240 vp_display_set_window_position(I, winx, winy);
1254 return vp_display_get_down_scaling_factor(I);