Patch [ 877891 ] Share the DC from DoPaint with FullPaint in ScintillaWX

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-01-16 00:52:17 +00:00
parent d1e2005486
commit 657dbfccd6
4 changed files with 16 additions and 16 deletions

View File

@@ -528,7 +528,7 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
delete surfaceWindow;
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
FullPaint();
FullPaint(dc);
}
paintState = notPainting;
}
@@ -833,18 +833,18 @@ void ScintillaWX::DoDragLeave() {
//----------------------------------------------------------------------
// Redraw all of text area. This paint will not be abandoned.
void ScintillaWX::FullPaint() {
void ScintillaWX::FullPaint(wxDC *dc) {
wxCHECK_RET(dc != NULL, wxT("Invalid wxDC in ScintillaWX::FillPaint"));
paintState = painting;
rcPaint = GetClientRectangle();
paintingAllText = true;
wxClientDC dc(stc);
Surface* surfaceWindow = Surface::Allocate();
surfaceWindow->Init(&dc, wMain.GetID());
surfaceWindow->Init(dc, wMain.GetID());
dc.BeginDrawing();
ClipChildren(dc, rcPaint);
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
dc.EndDrawing();
dc->EndDrawing();
delete surfaceWindow;
paintState = notPainting;

View File

@@ -156,7 +156,7 @@ public:
// helpers
void FullPaint();
void FullPaint(wxDC *dc);
bool CanPaste();
bool GetHideSelection() { return hideSelection; }
void DoScrollToLine(int line);