File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ namespace rs2
78
78
glPopAttrib ();
79
79
}
80
80
81
- void draw_rect (const rect& r, int line_width)
81
+ void draw_rect ( const rect & r, int line_width, bool draw_cross )
82
82
{
83
83
glPushAttrib (GL_ENABLE_BIT);
84
84
@@ -96,6 +96,20 @@ namespace rs2
96
96
glVertex2f (r.x , r.y );
97
97
glEnd ();
98
98
99
+ if ( draw_cross )
100
+ {
101
+ glLineStipple ( 1 , 0x0808 );
102
+ glEnable ( GL_LINE_STIPPLE );
103
+ glBegin ( GL_LINES );
104
+ glVertex2f ( r.x , r.y + r.h / 2 );
105
+ glVertex2f ( r.x + r.w , r.y + r.h / 2 );
106
+ glEnd ();
107
+ glBegin ( GL_LINES );
108
+ glVertex2f ( r.x + r.w / 2 , r.y );
109
+ glVertex2f ( r.x + r.w / 2 , r.y + r.h );
110
+ glEnd ();
111
+ }
112
+
99
113
glPopAttrib ();
100
114
}
101
115
@@ -1541,7 +1555,7 @@ namespace rs2
1541
1555
1542
1556
r = r.normalize (_normalized_zoom.unnormalize (get_original_stream_bounds ())).unnormalize (stream_rect).cut_by (stream_rect);
1543
1557
glColor3f (yellow.x , yellow.y , yellow.z );
1544
- draw_rect (r, 2 );
1558
+ draw_rect (r, 2 , true );
1545
1559
1546
1560
std::string message = " Metrics Region of Interest" ;
1547
1561
auto msg_width = stb_easy_font_width ((char *)message.c_str ());
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace rs2
14
14
class subdevice_model ;
15
15
class viewer_model ;
16
16
17
- void draw_rect (const rect& r, int line_width = 1 );
17
+ void draw_rect (const rect& r, int line_width = 1 , bool draw_cross = false );
18
18
19
19
struct frame_metadata
20
20
{
You can’t perform that action at this time.
0 commit comments