20 #ifndef KJB_CPP_SEGMENT_PAIR_H
21 #define KJB_CPP_SEGMENT_PAIR_H
24 #include <edge/line_segment.h>
66 void draw(
Image & img,
double ir = 255.0,
double ig = 0.0,
double ib = 0.0)
const
68 ls1.
draw(img, ir, ig, ib);
69 ls2.
draw(img, ir, ig, ib);
76 img(v1(1), v1(0), 0) = 255.0;
77 img(v1(1), v1(0), 1) = 0.0;
78 img(v1(1), v1(0), 2) = 0.0;
79 img(v2(1), v2(0), 0) = 255.0;
80 img(v2(1), v2(0), 1) = 0.0;
81 img(v2(1), v2(0), 2) = 0.0;
const Vector & get_extremity_2() const
Definition: segment_pair.h:93
double get_end_y() const
Returns the y-coordinate of the rightmost point of the segment.
Definition: gr_line_segment.h:174
const Line_segment & get_segment2() const
Definition: segment_pair.h:61
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
double get_start_y() const
Returns the y-coordinate of the leftmost point of the segment.
Definition: gr_line_segment.h:159
const Vector & get_extremity_1() const
Definition: segment_pair.h:84
void draw(kjb::Image &img, double ir, double ig, double ib, double width=1.0) const
Draws this line segment.
Definition: gr_line_segment.cpp:423
const Line_segment & get_segment1() const
Definition: segment_pair.h:56
const kjb::Vector & get_end() const
Returns the rightmost point of the segment.
Definition: gr_line_segment.h:180
const kjb::Vector & get_start() const
Returns the leftmost point of the segment.
Definition: gr_line_segment.h:165
void draw(Image &img, double ir=255.0, double ig=0.0, double ib=0.0) const
Definition: segment_pair.h:66
void draw_extremities(Image &img, double ir=255.0, double ig=0.0, double ib=0.0) const
Definition: segment_pair.h:72
Segment_pair(const Segment_pair &src)
Definition: segment_pair.h:39
~Segment_pair()
Definition: segment_pair.h:51
Code for a wrapper class around the C struct KJB_Image.
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
Segment_pair(const Line_segment &is1, const Line_segment &is2)
Definition: segment_pair.h:34
Class to manipulate a line segment The class is parametrized in terms the position of the centre...
Definition: gr_line_segment.h:62
Definition: segment_pair.h:31
Segment_pair & operator=(const Segment_pair &src)
Definition: segment_pair.h:44