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,
|
||||
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,
|
||||
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)
|
||||
{ DoDrawRectangle(x, y, width, height); }
|
||||
@@ -695,7 +695,7 @@ protected:
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
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,
|
||||
int fillStyle);
|
||||
|
||||
|
@@ -67,7 +67,7 @@ public:
|
||||
void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
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 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 DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
|
||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
@@ -191,7 +191,7 @@ protected:
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
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,
|
||||
int fillStyle = wxODDEVEN_RULE);
|
||||
|
||||
|
@@ -108,14 +108,14 @@ void wxDCBase::DrawPolygon(const wxList *list,
|
||||
|
||||
void
|
||||
wxDCBase::DoDrawPolyPolygon(int n,
|
||||
int start[],
|
||||
int count[],
|
||||
wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
int fillStyle)
|
||||
{
|
||||
if ( n == 1 )
|
||||
{
|
||||
DoDrawPolygon(start[0], points, xoffset, yoffset, fillStyle);
|
||||
DoDrawPolygon(count[0], points, xoffset, yoffset, fillStyle);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,14 +126,14 @@ wxDCBase::DoDrawPolyPolygon(int n,
|
||||
for (i = j = lastOfs = 0; i < n; i++)
|
||||
{
|
||||
lastOfs = j;
|
||||
j += start[i];
|
||||
j += count[i];
|
||||
}
|
||||
pts = new wxPoint[j+n-1];
|
||||
for (i = 0; i < j; i++)
|
||||
pts[i] = points[i];
|
||||
for (i = 2; i <= n; i++)
|
||||
{
|
||||
lastOfs -= start[n-i];
|
||||
lastOfs -= count[n-i];
|
||||
pts[j++] = pts[lastOfs];
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ wxDCBase::DoDrawPolyPolygon(int n,
|
||||
SetPen(pen);
|
||||
for (i = j = 0; i < n; i++)
|
||||
{
|
||||
DoDrawLines(start[i], pts+j, xoffset, yoffset);
|
||||
j += start[i];
|
||||
DoDrawLines(count[i], pts+j, xoffset, yoffset);
|
||||
j += count[i];
|
||||
}
|
||||
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") );
|
||||
|
||||
@@ -626,7 +626,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
||||
PsPrint( "newpath\n" );
|
||||
|
||||
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 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 );
|
||||
|
||||
for (int j = 1; j < start[i]; j++)
|
||||
for (int j = 1; j < count[i]; j++)
|
||||
{
|
||||
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
||||
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
||||
@@ -655,7 +655,7 @@ void wxPostScriptDC::DoDrawPolyPolygon (int n, int start[], wxPoint points[], wx
|
||||
PsPrint( "newpath\n" );
|
||||
|
||||
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 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 );
|
||||
|
||||
for (int j = 1; j < start[i]; j++)
|
||||
for (int j = 1; j < count[i]; j++)
|
||||
{
|
||||
xx = LogicalToDeviceX(points[ofs+j].x + xoffset);
|
||||
yy = LogicalToDeviceY(points[ofs+j].y + yoffset);
|
||||
|
@@ -780,7 +780,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs
|
||||
|
||||
void
|
||||
wxDC::DoDrawPolyPolygon(int n,
|
||||
int start[],
|
||||
int count[],
|
||||
wxPoint points[],
|
||||
wxCoord xoffset,
|
||||
wxCoord yoffset,
|
||||
@@ -794,7 +794,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
||||
wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling
|
||||
int i, cnt;
|
||||
for (i = cnt = 0; i < n; i++)
|
||||
cnt += start[i];
|
||||
cnt += count[i];
|
||||
|
||||
// Do things less efficiently if we have offsets
|
||||
if (xoffset != 0 || yoffset != 0)
|
||||
@@ -810,7 +810,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
||||
#ifndef __WXWINCE__
|
||||
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
||||
#endif
|
||||
(void)PolyPolygon(GetHdc(), cpoints, start, n);
|
||||
(void)PolyPolygon(GetHdc(), cpoints, count, n);
|
||||
#ifndef __WXWINCE__
|
||||
SetPolyFillMode(GetHdc(),prev);
|
||||
#endif
|
||||
@@ -824,7 +824,7 @@ wxDC::DoDrawPolyPolygon(int n,
|
||||
#ifndef __WXWINCE__
|
||||
int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
|
||||
#endif
|
||||
(void)PolyPolygon(GetHdc(), (POINT*) points, start, n);
|
||||
(void)PolyPolygon(GetHdc(), (POINT*) points, count, n);
|
||||
#ifndef __WXWINCE__
|
||||
SetPolyFillMode(GetHdc(),prev);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user