compilation fix for VC8 (see patch 1429985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -788,12 +788,6 @@ void wxDCBase::GradientFillConcentric(const wxRect& rect,
|
|||||||
wxUint8 nR, nG, nB;
|
wxUint8 nR, nG, nB;
|
||||||
|
|
||||||
|
|
||||||
//offsets of the current pixel
|
|
||||||
wxInt32 x, y;
|
|
||||||
|
|
||||||
//Color difference
|
|
||||||
wxInt32 nGradient;
|
|
||||||
|
|
||||||
//Radius
|
//Radius
|
||||||
wxInt32 cx = rect.GetWidth() / 2;
|
wxInt32 cx = rect.GetWidth() / 2;
|
||||||
wxInt32 cy = rect.GetHeight() / 2;
|
wxInt32 cy = rect.GetHeight() / 2;
|
||||||
@@ -807,19 +801,16 @@ void wxDCBase::GradientFillConcentric(const wxRect& rect,
|
|||||||
wxInt32 nCircleOffX = circleCenter.x - (rect.GetWidth() / 2);
|
wxInt32 nCircleOffX = circleCenter.x - (rect.GetWidth() / 2);
|
||||||
wxInt32 nCircleOffY = circleCenter.y - (rect.GetHeight() / 2);
|
wxInt32 nCircleOffY = circleCenter.y - (rect.GetHeight() / 2);
|
||||||
|
|
||||||
for (x = 0; x < rect.GetWidth(); x++)
|
for ( wxInt32 x = 0; x < rect.GetWidth(); x++ )
|
||||||
{
|
{
|
||||||
for (y = 0; y < rect.GetHeight(); y++)
|
for ( wxInt32 y = 0; y < rect.GetHeight(); y++ )
|
||||||
{
|
{
|
||||||
//get color difference
|
//get color difference
|
||||||
nGradient = (
|
wxInt32 nGradient = ((nRadius -
|
||||||
(nRadius -
|
(wxInt32)sqrt(
|
||||||
(wxInt32)sqrt(
|
pow((double)(x - cx - nCircleOffX), 2) +
|
||||||
pow(x - cx - nCircleOffX, 2) +
|
pow((double)(y - cy - nCircleOffY), 2)
|
||||||
pow(y - cy - nCircleOffY, 2)
|
)) * 100) / nRadius;
|
||||||
)
|
|
||||||
) * 100
|
|
||||||
) / nRadius;
|
|
||||||
|
|
||||||
//normalize Gradient
|
//normalize Gradient
|
||||||
if (nGradient < 0 )
|
if (nGradient < 0 )
|
||||||
|
Reference in New Issue
Block a user