renamed start parameter of wxDC::DrawPolyPolygon() to count (patch 882189)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,10 +211,10 @@ public:
|
|||||||
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
||||||
int fillStyle = wxODDEVEN_RULE);
|
int fillStyle = wxODDEVEN_RULE);
|
||||||
|
|
||||||
void DrawPolyPolygon(int n, int start[], wxPoint points[],
|
void DrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||||
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
||||||
int fillStyle = wxODDEVEN_RULE)
|
int fillStyle = wxODDEVEN_RULE)
|
||||||
{ DoDrawPolyPolygon(n, start, points, xoffset, yoffset, fillStyle); }
|
{ DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
|
||||||
|
|
||||||
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||||
{ DoDrawRectangle(x, y, width, height); }
|
{ DoDrawRectangle(x, y, width, height); }
|
||||||
@@ -695,7 +695,7 @@ protected:
|
|||||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||||
wxCoord xoffset, wxCoord yoffset,
|
wxCoord xoffset, wxCoord yoffset,
|
||||||
int fillStyle = wxODDEVEN_RULE) = 0;
|
int fillStyle = wxODDEVEN_RULE) = 0;
|
||||||
virtual void DoDrawPolyPolygon(int n, int start[], wxPoint points[],
|
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||||
wxCoord xoffset, wxCoord yoffset,
|
wxCoord xoffset, wxCoord yoffset,
|
||||||
int fillStyle);
|
int fillStyle);
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ public:
|
|||||||
void DoDrawPoint(wxCoord x, wxCoord y);
|
void DoDrawPoint(wxCoord x, wxCoord y);
|
||||||
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
|
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
|
||||||
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
|
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
|
||||||
void DoDrawPolyPolygon(int n, int start[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
|
void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
|
||||||
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
|
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
|
||||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
|
@@ -191,7 +191,7 @@ protected:
|
|||||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||||
wxCoord xoffset, wxCoord yoffset,
|
wxCoord xoffset, wxCoord yoffset,
|
||||||
int fillStyle = wxODDEVEN_RULE);
|
int fillStyle = wxODDEVEN_RULE);
|
||||||
virtual void DoDrawPolyPolygon(int n, int start[], wxPoint points[],
|
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||||
wxCoord xoffset, wxCoord yoffset,
|
wxCoord xoffset, wxCoord yoffset,
|
||||||
int fillStyle = wxODDEVEN_RULE);
|
int fillStyle = wxODDEVEN_RULE);
|
||||||
|
|
||||||
|
@@ -108,14 +108,14 @@ void wxDCBase::DrawPolygon(const wxList *list,
|
|||||||
|
|
||||||
void
|
void
|
||||||
wxDCBase::DoDrawPolyPolygon(int n,
|
wxDCBase::DoDrawPolyPolygon(int n,
|
||||||
int start[],
|
int count[],
|
||||||
wxPoint points[],
|
wxPoint points[],
|
||||||
wxCoord xoffset, wxCoord yoffset,
|
wxCoord xoffset, wxCoord yoffset,
|
||||||
int fillStyle)
|
int fillStyle)
|
||||||
{
|
{
|
||||||
if ( n == 1 )
|
if ( n == 1 )
|
||||||
{
|
{
|
||||||
DoDrawPolygon(start[0], points, xoffset, yoffset, fillStyle);
|
DoDrawPolygon(count[0], points, xoffset, yoffset, fillStyle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,14 +126,14 @@ wxDCBase::DoDrawPolyPolygon(int n,
|
|||||||
for (i = j = lastOfs = 0; i < n; i++)
|
for (i = j = lastOfs = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
lastOfs = j;
|
lastOfs = j;
|
||||||
j += start[i];
|
j += count[i];
|
||||||
}
|
}
|
||||||
pts = new wxPoint[j+n-1];
|
pts = new wxPoint[j+n-1];
|
||||||
for (i = 0; i < j; i++)
|
for (i = 0; i < j; i++)
|
||||||
pts[i] = points[i];
|
pts[i] = points[i];
|
||||||
for (i = 2; i <= n; i++)
|
for (i = 2; i <= n; i++)
|
||||||
{
|
{
|
||||||
lastOfs -= start[n-i];
|
lastOfs -= count[n-i];
|
||||||
pts[j++] = pts[lastOfs];
|
pts[j++] = pts[lastOfs];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,8 +143,8 @@ wxDCBase::DoDrawPolyPolygon(int n,
|
|||||||
SetPen(pen);
|
SetPen(pen);
|
||||||
for (i = j = 0; i < n; i++)
|
for (i = j = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
DoDrawLines(start[i], pts+j, xoffset, yoffset);
|
DoDrawLines(count[i], pts+j, xoffset, yoffset);
|
||||||
j += start[i];
|
j += count[i];
|
||||||
}
|
}
|
||||||
delete pts;
|
delete pts;
|
||||||
}
|
}
|
||||||
|
@@ -613,7 +613,7 @@ void wxPostScriptDC::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset, wx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle)
|
void wxPostScriptDC::DoDrawPolyPolygon (int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
|
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
|||||||
PsPrint( "newpath\n" );
|
PsPrint( "newpath\n" );
|
||||||
|
|
||||||
int ofs = 0;
|
int ofs = 0;
|
||||||
for (int i = 0; i < n; ofs += start[i++])
|
for (int i = 0; i < n; ofs += count[i++])
|
||||||
{
|
{
|
||||||
wxCoord xx = LogicalToDeviceX(points[ofs].x + xoffset);
|
wxCoord xx = LogicalToDeviceX(points[ofs].x + xoffset);
|
||||||
wxCoord yy = LogicalToDeviceY(points[ofs].y + yoffset);
|
wxCoord yy = LogicalToDeviceY(points[ofs].y + yoffset);
|
||||||
@@ -635,7 +635,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
|||||||
|
|
||||||
CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset );
|
CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset );
|
||||||
|
|
||||||
for (int j = 1; j < start[i]; j++)
|
for (int j = 1; j < count[i]; j++)
|
||||||
{
|
{
|
||||||
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
||||||
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
||||||
@@ -655,7 +655,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
|||||||
PsPrint( "newpath\n" );
|
PsPrint( "newpath\n" );
|
||||||
|
|
||||||
int ofs = 0;
|
int ofs = 0;
|
||||||
for (int i = 0; i < n; ofs += start[i++])
|
for (int i = 0; i < n; ofs += count[i++])
|
||||||
{
|
{
|
||||||
wxCoord xx = LogicalToDeviceX(points[ofs].x + xoffset);
|
wxCoord xx = LogicalToDeviceX(points[ofs].x + xoffset);
|
||||||
wxCoord yy = LogicalToDeviceY(points[ofs].y + yoffset);
|
wxCoord yy = LogicalToDeviceY(points[ofs].y + yoffset);
|
||||||
@@ -664,7 +664,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
|||||||
|
|
||||||
CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset );
|
CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset );
|
||||||
|
|
||||||
for (int j = 1; j < start[i]; j++)
|
for (int j = 1; j < count[i]; j++)
|
||||||
{
|
{
|
||||||
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
||||||
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
||||||
|
@@ -780,7 +780,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs
|
|||||||
|
|
||||||
void
|
void
|
||||||
wxDC::DoDrawPolyPolygon(int n,
|
wxDC::DoDrawPolyPolygon(int n,
|
||||||
int start[],
|
int count[],
|
||||||
wxPoint points[],
|
wxPoint points[],
|
||||||
wxCoord xoffset,
|
wxCoord xoffset,
|
||||||
wxCoord yoffset,
|
wxCoord yoffset,
|
||||||
@@ -794,7 +794,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
|||||||
wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling
|
wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling
|
||||||
int i, cnt;
|
int i, cnt;
|
||||||
for (i = cnt = 0; i < n; i++)
|
for (i = cnt = 0; i < n; i++)
|
||||||
cnt += start[i];
|
cnt += count[i];
|
||||||
|
|
||||||
// Do things less efficiently if we have offsets
|
// Do things less efficiently if we have offsets
|
||||||
if (xoffset != 0 || yoffset != 0)
|
if (xoffset != 0 || yoffset != 0)
|
||||||
@@ -810,7 +810,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
|||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
||||||
#endif
|
#endif
|
||||||
(void)PolyPolygon(GetHdc(), cpoints, start, n);
|
(void)PolyPolygon(GetHdc(), cpoints, count, n);
|
||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
SetPolyFillMode(GetHdc(),prev);
|
SetPolyFillMode(GetHdc(),prev);
|
||||||
#endif
|
#endif
|
||||||
@@ -824,7 +824,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
|||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
||||||
#endif
|
#endif
|
||||||
(void)PolyPolygon(GetHdc(), (POINT*) points, start, n);
|
(void)PolyPolygon(GetHdc(), (POINT*) points, count, n);
|
||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
SetPolyFillMode(GetHdc(),prev);
|
SetPolyFillMode(GetHdc(),prev);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user