Fix problem interaction between waveform outlines and scrolling.
This commit is contained in:
parent
1b5cac563b
commit
e7ab9a3727
|
@ -610,6 +610,10 @@ Region::draw ( void )
|
|||
/* no coverage */
|
||||
return;
|
||||
|
||||
/* account for waveform outlines... */
|
||||
X -= 2;
|
||||
W += 4;
|
||||
|
||||
int OX = scroll_x();
|
||||
int ox = timeline->ts_to_x( _r->offset );
|
||||
|
||||
|
@ -915,7 +919,7 @@ Region::write ( nframes_t nframes )
|
|||
if ( W )
|
||||
{
|
||||
++W;
|
||||
track()->damage( FL_DAMAGE_EXPOSE, x() + w() - W, y(), W, h() );
|
||||
track()->damage( FL_DAMAGE_ALL, x() + w() - W, y(), W, h() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ Waveform::draw ( int X, int Y, int W, int H,
|
|||
Peak *pbuf, int peaks, int skip,
|
||||
Fl_Color color )
|
||||
{
|
||||
fl_push_clip( X, Y, W, H );
|
||||
// fl_push_clip( X, Y, W, H );
|
||||
|
||||
int j;
|
||||
|
||||
|
@ -103,11 +103,13 @@ Waveform::draw ( int X, int Y, int W, int H,
|
|||
|
||||
fl_color( fl_darker( fl_darker( color ) ) );
|
||||
|
||||
fl_line_style( FL_SOLID, 2 );
|
||||
fl_line_style( FL_SOLID | FL_CAP_FLAT, 2 );
|
||||
// fl_line_style( FL_SOLID, 0 );
|
||||
|
||||
fl_begin_line();
|
||||
|
||||
j = start;
|
||||
|
||||
for ( int x = X; x < X + W; ++x, j += skip )
|
||||
fl_vertex( x, ty + ( halfheight * pbuf[ j ].min ) );
|
||||
|
||||
|
@ -116,6 +118,7 @@ Waveform::draw ( int X, int Y, int W, int H,
|
|||
fl_begin_line();
|
||||
|
||||
j = start;
|
||||
|
||||
for ( int x = X; x < X + W; ++x, j += skip )
|
||||
fl_vertex( x, ty + ( halfheight * pbuf[ j ].max ) );
|
||||
|
||||
|
@ -125,5 +128,5 @@ Waveform::draw ( int X, int Y, int W, int H,
|
|||
|
||||
}
|
||||
|
||||
fl_pop_clip();
|
||||
// fl_pop_clip();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue