Browse Source

Draw control points with a polygon.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
394d079706
2 changed files with 27 additions and 6 deletions
  1. +1
    -0
      Control_Point.H
  2. +26
    -6
      Control_Track.H

+ 1
- 0
Control_Point.H View File

@@ -154,6 +154,7 @@ public:
_y = (float)Y / parent()->h(); _y = (float)Y / parent()->h();
redraw(); redraw();
} }
track()->sort();
break; break;
} }
} }


+ 26
- 6
Control_Track.H View File

@@ -53,12 +53,32 @@ public:


fl_color( selection_color() ); fl_color( selection_color() );


fl_begin_line();
fl_begin_complex_polygon();


for ( list <Track_Widget *>::const_iterator r = _widgets.begin(); r != _widgets.end(); r++ )
fl_vertex( (*r)->x(), (*r)->y() );
list <Track_Widget *>::const_iterator e = _widgets.end();
e--;

if ( _widgets.size() )
for ( list <Track_Widget *>::const_iterator r = _widgets.begin(); ; r++ )
{
if ( r == _widgets.begin() )
{
fl_vertex( x(), y() + h() );
fl_vertex( x(), (*r)->y() );
}

fl_vertex( (*r)->x(), (*r)->y() );

if ( r == e )
{
fl_vertex( x() + w(), (*r)->y() );
fl_vertex( x() + w(), y() + h() );
break;
}

}


fl_end_line();
fl_end_complex_polygon();


fl_line_style( FL_SOLID, 0 ); fl_line_style( FL_SOLID, 0 );


@@ -73,8 +93,8 @@ public:
{ {
int r = Track::handle( m ); int r = Track::handle( m );


if ( r )
return r;
if ( r )
return r;


switch ( m ) switch ( m )
{ {


Loading…
Cancel
Save