Draw control points with a polygon.

pull/3/head
Jonathan Moore Liles 2008-03-08 13:39:20 -06:00
parent 65e251360f
commit 394d079706
2 changed files with 27 additions and 6 deletions

View File

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

View File

@ -53,12 +53,32 @@ public:
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--;
fl_end_line();
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_complex_polygon();
fl_line_style( FL_SOLID, 0 );
@ -73,8 +93,8 @@ public:
{
int r = Track::handle( m );
if ( r )
return r;
if ( r )
return r;
switch ( m )
{