Use wxDCPenChanger instead of setting/resetting pen explicitly.
No real changes, just use wxDCPenChanger instead of manual calls to SetPen() in wxDCImpl::DrawPolygon(). This makes the code shorter and more clear. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bce926c580
commit
f8ce98ded0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user