зеркало из https://github.com/mozilla/gecko-dev.git
Changed array of points to be a const for DrawPolygon() and FillPolygon()
This commit is contained in:
Родитель
0ecc2690fa
Коммит
a3a4da0885
|
@ -638,7 +638,7 @@ void nsRenderingContextMac :: FillRect(nscoord aX, nscoord aY, nscoord aWidth, n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nsRenderingContextMac::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextMac::DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
PRUint32 i ;
|
PRUint32 i ;
|
||||||
XPoint * xpoints;
|
XPoint * xpoints;
|
||||||
|
@ -661,7 +661,7 @@ void nsRenderingContextMac::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
PR_Free((void *)xpoints);
|
PR_Free((void *)xpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsRenderingContextMac::FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextMac::FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
PRUint32 i ;
|
PRUint32 i ;
|
||||||
XPoint * xpoints;
|
XPoint * xpoints;
|
||||||
|
|
|
@ -97,8 +97,8 @@ public:
|
||||||
virtual void FillRect(const nsRect& aRect);
|
virtual void FillRect(const nsRect& aRect);
|
||||||
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
||||||
virtual void DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
virtual void FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
|
|
||||||
virtual void DrawEllipse(const nsRect& aRect);
|
virtual void DrawEllipse(const nsRect& aRect);
|
||||||
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
|
@ -784,7 +784,7 @@ void nsRenderingContextUnix :: FillRect(nscoord aX, nscoord aY, nscoord aWidth,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nsRenderingContextUnix::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextUnix::DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
PRUint32 i ;
|
PRUint32 i ;
|
||||||
XPoint * xpoints;
|
XPoint * xpoints;
|
||||||
|
@ -807,7 +807,7 @@ void nsRenderingContextUnix::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
PR_Free((void *)xpoints);
|
PR_Free((void *)xpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsRenderingContextUnix::FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextUnix::FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
PRUint32 i ;
|
PRUint32 i ;
|
||||||
XPoint * xpoints;
|
XPoint * xpoints;
|
||||||
|
|
|
@ -106,8 +106,8 @@ public:
|
||||||
virtual void FillRect(const nsRect& aRect);
|
virtual void FillRect(const nsRect& aRect);
|
||||||
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
||||||
virtual void DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
virtual void FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
|
|
||||||
virtual void DrawEllipse(const nsRect& aRect);
|
virtual void DrawEllipse(const nsRect& aRect);
|
||||||
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
|
@ -267,14 +267,14 @@ public:
|
||||||
* @param aPoints points to use for the drawing, last must equal first
|
* @param aPoints points to use for the drawing, last must equal first
|
||||||
* @param aNumPonts number of points in the polygon
|
* @param aNumPonts number of points in the polygon
|
||||||
*/
|
*/
|
||||||
virtual void DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints) = 0;
|
virtual void DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill a poly in the current foreground color
|
* Fill a poly in the current foreground color
|
||||||
* @param aPoints points to use for the drawing, last must equal first
|
* @param aPoints points to use for the drawing, last must equal first
|
||||||
* @param aNumPonts number of points in the polygon
|
* @param aNumPonts number of points in the polygon
|
||||||
*/
|
*/
|
||||||
virtual void FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints) = 0;
|
virtual void FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw an ellipse in the current foreground color
|
* Draw an ellipse in the current foreground color
|
||||||
|
|
|
@ -719,7 +719,7 @@ void nsRenderingContextWin :: FillRect(nscoord aX, nscoord aY, nscoord aWidth, n
|
||||||
::FillRect(mDC, &nr, SetupSolidBrush());
|
::FillRect(mDC, &nr, SetupSolidBrush());
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsRenderingContextWin::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextWin::DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
// First transform nsPoint's into POINT's; perform coordinate space
|
// First transform nsPoint's into POINT's; perform coordinate space
|
||||||
// transformation at the same time
|
// transformation at the same time
|
||||||
|
@ -756,7 +756,7 @@ void nsRenderingContextWin::DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
delete pp0;
|
delete pp0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsRenderingContextWin::FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
void nsRenderingContextWin::FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)
|
||||||
{
|
{
|
||||||
// First transform nsPoint's into POINT's; perform coordinate space
|
// First transform nsPoint's into POINT's; perform coordinate space
|
||||||
// transformation at the same time
|
// transformation at the same time
|
||||||
|
|
|
@ -93,8 +93,8 @@ public:
|
||||||
virtual void FillRect(const nsRect& aRect);
|
virtual void FillRect(const nsRect& aRect);
|
||||||
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
||||||
virtual void DrawPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
virtual void FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints);
|
virtual void FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||||
|
|
||||||
virtual void DrawEllipse(const nsRect& aRect);
|
virtual void DrawEllipse(const nsRect& aRect);
|
||||||
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
virtual void DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче