prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / timebar.C
index e386bea54120c4ffb2e6d769aa3a2105ba29a769..10a095f9546edbb81a97c4a0a10ec38bca83a73c 100644 (file)
@@ -309,6 +309,29 @@ void TimeBar::update_highlights()
        }
        else
                if( out_point ) out_point->update(0);
+
+       draw_inout_highlight();
+}
+
+void TimeBar::draw_inout_highlight()
+{
+       EDL *edl = get_edl();
+       if( !edl->local_session->inpoint_valid() ) return;
+       if( !edl->local_session->outpoint_valid() ) return;
+       double in_position = edl->local_session->get_inpoint();
+       double out_position = edl->local_session->get_outpoint();
+       if( in_position >= out_position ) return;
+       int in_x = position_to_pixel(in_position);
+       int out_x = position_to_pixel(out_position);
+       CLAMP(in_x, 0, get_w());
+       CLAMP(out_x, 0, get_w());
+       set_color(GREEN);
+       int lw = 5;
+       set_line_width(lw);
+       set_inverse();
+       draw_line(in_x, get_h()-2*lw, out_x, get_h()-2*lw);
+       set_opaque();
+       set_line_width(1);
 }
 
 void TimeBar::update_points()