PrOpEr CaPiTaLiZaTiOn

ooh and front+backtrace for movement display

Originally committed to SVN as r46.
This commit is contained in:
tentacle 2006-01-29 20:59:58 +00:00
parent 74a399aaa9
commit 1bb7209d52
2 changed files with 34 additions and 7 deletions

View file

@ -55,12 +55,12 @@
// Tracker Menu
void FrameMain::OnVideoTrackerMenu(wxCommandEvent &event) {
wxMenu menu( _("FexTracker") );
AppendBitmapMenuItem(&menu, Video_Track_Points, _("track points"), _(""), wxBITMAP(button_track_points));
AppendBitmapMenuItem(&menu, Video_Track_Points, _("Track points"), _(""), wxBITMAP(button_track_points));
menu.AppendSeparator();
AppendBitmapMenuItem(&menu, Video_Track_Point_Add, _("add points to movement"), _(""), wxBITMAP(button_track_point_add));
AppendBitmapMenuItem(&menu, Video_Track_Point_Del, _("remove points from movement"), _(""), wxBITMAP(button_track_point_del));
AppendBitmapMenuItem(&menu, Video_Track_Point_Add, _("Add points to movement"), _(""), wxBITMAP(button_track_point_add));
AppendBitmapMenuItem(&menu, Video_Track_Point_Del, _("Remove points from movement"), _(""), wxBITMAP(button_track_point_del));
menu.AppendSeparator();
AppendBitmapMenuItem(&menu, Video_Track_Movement, _("generate movement from points"), _(""), wxBITMAP(button_track_movement));
AppendBitmapMenuItem(&menu, Video_Track_Movement, _("Generate movement from points"), _(""), wxBITMAP(button_track_movement));
PopupMenu(&menu);
}
@ -69,10 +69,10 @@ void FrameMain::OnVideoTrackerMenu(wxCommandEvent &event) {
// Movement Menu
void FrameMain::OnVideoTrackerMenu2(wxCommandEvent &event) {
wxMenu menu( _("FexMovement") );
AppendBitmapMenuItem(&menu, Video_Track_Movement_MoveAll, _("move subtitle"), _(""), wxBITMAP(button_track_move));
AppendBitmapMenuItem(&menu, Video_Track_Movement_MoveOne, _("move subtitle only in this frame"), _(""), wxBITMAP(button_track_move));
AppendBitmapMenuItem(&menu, Video_Track_Movement_MoveAll, _("Move subtitle"), _(""), wxBITMAP(button_track_move));
AppendBitmapMenuItem(&menu, Video_Track_Movement_MoveOne, _("Move subtitle only in this frame"), _(""), wxBITMAP(button_track_move));
menu.AppendSeparator();
AppendBitmapMenuItem(&menu, Video_Track_Split_Line, _("split line for movement"), _(""), wxBITMAP(button_track_split_line));
AppendBitmapMenuItem(&menu, Video_Track_Split_Line, _("Split line for movement"), _(""), wxBITMAP(button_track_split_line));
PopupMenu(&menu);
}

View file

@ -627,8 +627,35 @@ void VideoDisplay::DrawTrackingOverlay( wxDC &dc )
f.Pos.y *= provider->GetZoom();
f.Scale.x *= 30* provider->GetZoom();
f.Scale.y *= 30* provider->GetZoom();
FexMovementFrame f3 = f;
dc.SetPen(wxPen(wxColour(0,0,255),1));
int nBack = 8;
while( --localframe>0 && nBack-- >0 )
{
FexMovementFrame f2 = curline->Movement->Frames.lVal[localframe];
f2.Pos.x *= provider->GetZoom();
f2.Pos.y *= provider->GetZoom();
dc.DrawLine( f2.Pos.x, f2.Pos.y, f3.Pos.x, f3.Pos.y );
f3 = f2;
}
dc.SetPen(wxPen(wxColour(255,0,0),2));
dc.DrawLine( f.Pos.x-f.Scale.x, f.Pos.y, f.Pos.x+f.Scale.x+1, f.Pos.y );
dc.DrawLine( f.Pos.x, f.Pos.y-f.Scale.y, f.Pos.x, f.Pos.y+f.Scale.y+1 );
f3 = f;
dc.SetPen(wxPen(wxColour(0,255,0),1));
int nFront = 8;
localframe = frame_n - StartFrame;
while( ++localframe<curline->Movement->Frames.size() && nFront-- >0 )
{
FexMovementFrame f2 = curline->Movement->Frames.lVal[localframe];
f2.Pos.x *= provider->GetZoom();
f2.Pos.y *= provider->GetZoom();
dc.DrawLine( f2.Pos.x, f2.Pos.y, f3.Pos.x, f3.Pos.y );
f3 = f2;
}
}
}