Don't try to be so fancy about drawing measure lines.
This commit is contained in:
parent
a6e65c8159
commit
c81d48c613
2
Region.C
2
Region.C
|
@ -464,7 +464,7 @@ Region::draw ( int X, int Y, int W, int H )
|
|||
_scale, selected() ? fl_invert_color( _color ) : _color );
|
||||
|
||||
|
||||
timeline->draw_measure_lines( rx, Y, rw, H, _box_color );
|
||||
// timeline->draw_measure_lines( rx, Y, rw, H, _box_color );
|
||||
|
||||
fl_color( FL_BLACK );
|
||||
fl_line( rx, Y, rx, Y + H );
|
||||
|
|
58
Timeline.C
58
Timeline.C
|
@ -25,6 +25,9 @@
|
|||
#include "Control_Track.H"
|
||||
#include <FL/Fl_Scrollbar.H>
|
||||
|
||||
#include <FL/Fl_Image.H>
|
||||
#include <FL/Fl_RGB_Image.H> // needed for alpha blending
|
||||
|
||||
#include "Track_Header.H"
|
||||
|
||||
void
|
||||
|
@ -353,6 +356,34 @@ Timeline::draw ( void )
|
|||
draw_child( *vscroll );
|
||||
|
||||
redraw_overlay();
|
||||
|
||||
|
||||
Rectangle &r = _selection;
|
||||
|
||||
/* unsigned char *data = fl_read_image( NULL, r.x, r.y, r.w, r.h, 0 ); */
|
||||
|
||||
/* Fl_RGB_Image bi( data, r.w, r.h, 3 ); */
|
||||
|
||||
/* bi.color_average( FL_BLACK, 0.50f ); */
|
||||
|
||||
/* bi.draw( r.x, r.y ); */
|
||||
|
||||
/* delete[] data; */
|
||||
|
||||
|
||||
if ( r.w && r.h )
|
||||
{
|
||||
const unsigned char data[] = { 0, 127, 0, 96,
|
||||
0, 96, 0, 127 };
|
||||
Fl_RGB_Image bi( data, 2, 2, 2 );
|
||||
|
||||
Fl_Image *bi2 = bi.copy( r.w, r.h );
|
||||
|
||||
bi2->draw( r.x, r.y );
|
||||
|
||||
delete bi2;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -393,11 +424,14 @@ Timeline::draw ( void )
|
|||
_old_yposition = _yposition;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Timeline::draw_overlay ( void )
|
||||
{
|
||||
if ( ! ( _selection.w && _selection.h ) )
|
||||
return;
|
||||
|
||||
fl_push_clip( tracks->x() + Track_Header::width(), rulers->y() + rulers->h(), tracks->w() - Track_Header::width(), h() - rulers->h() - hscroll->h() );
|
||||
|
||||
|
@ -421,8 +455,28 @@ Timeline::draw_overlay ( void )
|
|||
fl_line_style( FL_SOLID, 0 );
|
||||
|
||||
|
||||
fl_pop_clip();
|
||||
/* const unsigned char data[] = { 127, 127, 127, 96, */
|
||||
/* 127, 96, 127, 40 }; */
|
||||
/* Fl_RGB_Image bi( data, 2, 2, 2 ); */
|
||||
|
||||
/* Fl_Image *bi2 = bi.copy( r.w, r.h ); */
|
||||
|
||||
/* bi2->draw( r.x, r.y ); */
|
||||
|
||||
/* delete bi2; */
|
||||
|
||||
|
||||
/* unsigned char *data = fl_read_image( NULL, r.x, r.y, r.w, r.h, 0 ); */
|
||||
|
||||
/* Fl_RGB_Image bi( data, r.w, r.h, 3 ); */
|
||||
|
||||
/* bi.color_average( FL_BLACK, 0.50f ); */
|
||||
|
||||
/* bi.draw( r.x, r.y ); */
|
||||
|
||||
/* delete[] data; */
|
||||
|
||||
fl_pop_clip();
|
||||
|
||||
}
|
||||
|
||||
|
@ -500,6 +554,8 @@ Timeline::handle ( int m )
|
|||
|
||||
_selection.w = abs( ox );
|
||||
_selection.h = abs( oy );
|
||||
|
||||
redraw();
|
||||
break;
|
||||
}
|
||||
case FL_RELEASE:
|
||||
|
|
3
Track.C
3
Track.C
|
@ -60,8 +60,6 @@ Track::draw ( void )
|
|||
|
||||
Fl_Group::draw();
|
||||
|
||||
timeline->draw_measure_lines( x(), y(), w(), h(), color() );
|
||||
|
||||
int X, Y, W, H;
|
||||
|
||||
fl_clip_box( x(), y(), w(), h(), X, Y, W, H );
|
||||
|
@ -110,6 +108,7 @@ Track::draw ( void )
|
|||
for ( list <Track_Widget *>::const_iterator r = _widgets.begin(); r != _widgets.end(); r++ )
|
||||
(*r)->draw( X, Y, W, H );
|
||||
|
||||
timeline->draw_measure_lines( x(), y(), w(), h(), color() );
|
||||
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue