X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Ftrackcanvas.C;h=fc31969dc170aea124aa9b12af82211a1d0bbd66;hb=a76213673ecbfe4d860fb20de1b79ebc0d99c004;hp=96726f68222334a5a9af0f6766b404a1469ffdc3;hpb=3a7f190f52e534135f81fa84ec7be5a5beac257b;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index 96726f68..fc31969d 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -2785,9 +2785,9 @@ static int is_linear(FloatAuto *prev, FloatAuto *next) { if( !prev || !next ) return 1; if( prev->curve_mode == FloatAuto::LINEAR ) return 1; - int64_t ipos, opos; - if( !(ipos = prev->get_control_in_position()) && - !(opos = prev->get_control_out_position()) ) return 1; + int64_t ipos = prev->get_control_in_position(); + int64_t opos = prev->get_control_out_position(); + if( !ipos && !opos ) return 1; if( !ipos || !opos ) return 0; float ival = prev->get_control_in_value(); float oval = prev->get_control_out_value(); @@ -3716,43 +3716,6 @@ int TrackCanvas::draw_hairline(Auto *auto_keyframe, int color, int show) return 0; } -void TrackCanvas::draw_bline(int x1, int y1, int x2, int y2, BC_Pixmap *pixmap) -{ -// Short lines are all overhead to hw or sw setup, use bresenhams - if( y1 > y2 ) { - int tx = x1; x1 = x2; x2 = tx; - int ty = y1; y1 = y2; y2 = ty; - } - - int x = x1, y = y1; - int dx = x2-x1, dy = y2-y1; - int dx2 = 2*dx, dy2 = 2*dy; - if( dx < 0 ) dx = -dx; - int r = dx > dy ? dx : dy, n = r; - int dir = 0; - if( dx2 < 0 ) dir += 1; - if( dy >= dx ) { - if( dx2 >= 0 ) do { /* +Y, +X */ - draw_pixel(x, y++, pixmap); - if( (r -= dx2) < 0 ) { r += dy2; ++x; } - } while( --n >= 0 ); - else do { /* +Y, -X */ - draw_pixel(x, y++, pixmap); - if( (r += dx2) < 0 ) { r += dy2; --x; } - } while( --n >= 0 ); - } - else { - if( dx2 >= 0 ) do { /* +X, +Y */ - draw_pixel(x++, y, pixmap); - if( (r -= dy2) < 0 ) { r += dx2; ++y; } - } while( --n >= 0 ); - else do { /* -X, +Y */ - draw_pixel(x--, y, pixmap); - if( (r -= dy2) < 0 ) { r -= dx2; ++y; } - } while( --n >= 0 ); - } -} - void TrackCanvas::draw_overlays() { int new_cursor, update_cursor, rerender;