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:
@@ -730,7 +730,6 @@ wxDCImpl::DoDrawPolyPolygon(int n,
|
|||||||
|
|
||||||
int i, j, lastOfs;
|
int i, j, lastOfs;
|
||||||
wxPoint* pts;
|
wxPoint* pts;
|
||||||
wxPen pen;
|
|
||||||
|
|
||||||
for (i = j = lastOfs = 0; i < n; i++)
|
for (i = j = lastOfs = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
@@ -746,10 +745,11 @@ wxDCImpl::DoDrawPolyPolygon(int n,
|
|||||||
pts[j++] = pts[lastOfs];
|
pts[j++] = pts[lastOfs];
|
||||||
}
|
}
|
||||||
|
|
||||||
pen = GetPen();
|
{
|
||||||
SetPen(wxPen(*wxBLACK, 0, wxPENSTYLE_TRANSPARENT));
|
wxDCPenChanger setTransp(*m_owner, *wxTRANSPARENT_PEN);
|
||||||
DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle);
|
DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle);
|
||||||
SetPen(pen);
|
}
|
||||||
|
|
||||||
for (i = j = 0; i < n; i++)
|
for (i = j = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
DoDrawLines(count[i], pts+j, xoffset, yoffset);
|
DoDrawLines(count[i], pts+j, xoffset, yoffset);
|
||||||
|
Reference in New Issue
Block a user