{
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();
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;