X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d99859e492c91806d2415def24fd91b3703b6d1b..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/stc/PlatWX.cpp?ds=sidebyside diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 98eba98548..7bda5100eb 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -405,7 +405,7 @@ void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - //FillRectangle(rc, back); + FillRectangle(rc, back); // ybase is where the baseline should be, but wxWin uses the upper left // corner, so I need to calculate the real position for the text... @@ -418,11 +418,12 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - //FillRectangle(rc, back); + FillRectangle(rc, back); hdc->SetClippingRegion(wxRectFromPRectangle(rc)); // see comments above hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent); + hdc->DestroyClippingRegion(); } @@ -450,7 +451,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio #ifndef __WXMAC__ // Calculate the position of each character based on the widths of // the previous characters - int* tpos = new int[len]; + int* tpos = new int[len+1]; int totalWidth = 0; size_t i; for (i=0; i