Removed some more superfluous Begin/EndDrawing

Originally committed to SVN as r690.
This commit is contained in:
Niels Martin Hansen 2007-01-03 03:56:40 +00:00
parent 74d54d3272
commit ab9e184009
3 changed files with 1 additions and 17 deletions

View file

@ -208,6 +208,7 @@ wxString TextFileReader::ReadLineFromFile() {
buffer[511] = '\1';
if (fgets(buffer, 512, file)) {
// read succeeded
// FIXME, this might break on incomplete multibyte characters
wxString linepart(buffer, *conv);
wxbuffer += linepart;
if (buffer[511] == '\1') {

View file

@ -285,9 +285,7 @@ void VideoDisplay::OnPaint(wxPaintEvent& event) {
wxPaintDC dc(this);
// Draw frame
dc.BeginDrawing();
if (provider) dc.DrawBitmap(GetFrame(frame_n),0,0);
dc.EndDrawing();
}
@ -415,7 +413,6 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
// Prepare drawing
wxMemoryDC dc;
dc.SelectObject(*backbuffer);
dc.BeginDrawing();
// Draw frame
dc.DrawBitmap(GetFrame(frame_n),0,0);
@ -458,15 +455,10 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
dc.DrawText(text,dx,dy);
}
// End
dc.EndDrawing();
// Blit to screen
wxClientDC dcScreen(this);
dcScreen.BeginDrawing();
//dcScreen.DrawBitmap(backbuffer,0,0);
dcScreen.Blit(0,0,w,h,&dc,0,0);
dcScreen.EndDrawing();
}
}
@ -780,13 +772,10 @@ void VideoDisplay::DrawTrackingOverlay( wxDC &dc )
void VideoDisplay::RefreshVideo() {
// Draw frame
wxClientDC dc(this);
dc.BeginDrawing();
dc.DrawBitmap(GetFrame(),0,0);
// Draw the control points for FexTracker
DrawTrackingOverlay( dc );
dc.EndDrawing();
}
@ -795,7 +784,6 @@ void VideoDisplay::RefreshVideo() {
void VideoDisplay::DrawText( wxPoint Pos, wxString text ) {
// Draw frame
wxClientDC dc(this);
dc.BeginDrawing();
dc.SetBrush(wxBrush(wxColour(128,128,128),wxSOLID));
dc.DrawRectangle( 0,0, provider->GetWidth(), provider->GetHeight() );
dc.SetTextForeground(wxColour(64,64,64));
@ -805,7 +793,6 @@ void VideoDisplay::DrawText( wxPoint Pos, wxString text ) {
dc.DrawText(text,Pos.x-1,Pos.y+1);
dc.SetTextForeground(wxColour(255,255,255));
dc.DrawText(text,Pos.x,Pos.y);
dc.EndDrawing();
}

View file

@ -373,9 +373,7 @@ void VideoSlider::OnKeyDown(wxKeyEvent &event) {
// Paint event
void VideoSlider::OnPaint(wxPaintEvent &event) {
wxPaintDC dc(this);
dc.BeginDrawing();
DrawImage(dc);
dc.EndDrawing();
}
@ -472,9 +470,7 @@ void VideoSlider::DrawImage(wxDC &dc) {
// Update image
void VideoSlider::UpdateImage () {
wxClientDC dc(this);
dc.BeginDrawing();
DrawImage(dc);
dc.EndDrawing();
}