X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d8cdcf2e39810b8e6128ac8a504cc206068f58c..448ca22809ae775faae8c1366561d8add20536c5:/src/common/dcbase.cpp diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 415b71763a..d65b47e3e6 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -730,7 +730,6 @@ wxDCImpl::DoDrawPolyPolygon(int n, int i, j, lastOfs; wxPoint* pts; - wxPen pen; for (i = j = lastOfs = 0; i < n; i++) { @@ -746,10 +745,11 @@ wxDCImpl::DoDrawPolyPolygon(int n, pts[j++] = pts[lastOfs]; } - pen = GetPen(); - SetPen(wxPen(*wxBLACK, 0, wxPENSTYLE_TRANSPARENT)); - DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle); - SetPen(pen); + { + wxDCPenChanger setTransp(*m_owner, *wxTRANSPARENT_PEN); + DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle); + } + for (i = j = 0; i < n; i++) { DoDrawLines(count[i], pts+j, xoffset, yoffset); @@ -1205,6 +1205,12 @@ void wxDC::DrawLabel(const wxString& text, yUnderscore = 0; // split the string into lines and draw each of them separately + // + // NB: while wxDC::DrawText() on some platforms supports drawing multi-line + // strings natively, this is not the case for all of them, notably not + // wxMSW which uses this function for multi-line texts, so we may only + // call DrawText() for single-line strings from here to avoid infinite + // recursion. wxString curLine; for ( wxString::const_iterator pc = text.begin(); ; ++pc ) {