diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 9f71f7cd60..ddc1393610 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -637,14 +637,14 @@ public: // on a circle around (xc,yc) with the given radius; the colours may be // specified by just the two extremes or the full array of gradient stops wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxColour& oColor, const wxColour& cColor, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) const; wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) const; @@ -1026,8 +1026,8 @@ public: const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) = 0; virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) = 0; diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index 6901f0ea43..48d8301e42 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -659,8 +659,8 @@ public: /** Creates a native brush with a radial gradient. - The brush originates at (@a xo, @a yc) and ends on a circle around - (@a xc, @a yc) with the given @a radius. + The brush originates at (@a startX, @a startY) and ends on a circle around + (@a endX, @a endY) with the given @a radius. The gradient may be specified either by its start and end colours @a oColor and @a cColor or by a full set of gradient @a stops. @@ -668,8 +668,8 @@ public: The version taking wxGraphicsGradientStops is new in wxWidgets 2.9.1. */ virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxColour& oColor, const wxColour& cColor, @@ -679,8 +679,8 @@ public: @overload */ virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) = 0; @@ -1490,8 +1490,8 @@ public: Stops support is new since wxWidgets 2.9.1, previously only the start and end colours could be specified. */ - virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) = 0; diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 460b16c9df..99f1e81532 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -913,15 +913,15 @@ wxGraphicsContext::CreateLinearGradientBrush( wxGraphicsBrush wxGraphicsContext::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxColour &oColor, const wxColour &cColor, const wxGraphicsMatrix& matrix) const { return GetRenderer()->CreateRadialGradientBrush ( - xo, yo, - xc, yc, radius, + startX, startY, + endX, endY, radius, wxGraphicsGradientStops(oColor, cColor), matrix ); @@ -929,15 +929,15 @@ wxGraphicsContext::CreateRadialGradientBrush( wxGraphicsBrush wxGraphicsContext::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& gradientStops, const wxGraphicsMatrix& matrix) const { return GetRenderer()->CreateRadialGradientBrush ( - xo, yo, - xc, yc, radius, + startX, startY, + endX, endY, radius, gradientStops, matrix ); diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 7674e11370..3fce559fef 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -264,8 +264,8 @@ public: wxDouble x2, wxDouble y2, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); - void CreateRadialGradientPattern(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + void CreateRadialGradientPattern(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); @@ -765,13 +765,13 @@ wxCairoPenBrushBaseData::CreateLinearGradientPattern(wxDouble x1, wxDouble y1, } void -wxCairoPenBrushBaseData::CreateRadialGradientPattern(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, +wxCairoPenBrushBaseData::CreateRadialGradientPattern(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { - m_pattern = cairo_pattern_create_radial(xo,yo,0.0,xc,yc,radius); + m_pattern = cairo_pattern_create_radial(startX,startY,0.0,endX,endY,radius); if (! matrix.IsNull()) { @@ -2997,8 +2997,8 @@ public : const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; @@ -3201,15 +3201,15 @@ wxCairoRenderer::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, } wxGraphicsBrush -wxCairoRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble r, +wxCairoRenderer::CreateRadialGradientBrush(wxDouble startX, wxDouble startX, + wxDouble endX, wxDouble endY, wxDouble r, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { wxGraphicsBrush p; ENSURE_LOADED_OR_RETURN(p); wxCairoBrushData* d = new wxCairoBrushData( this ); - d->CreateRadialGradientPattern(xo, yo, xc, yc, r, stops, matrix); + d->CreateRadialGradientPattern(startX, startY, endX, endY, r, stops, matrix); p.SetRefData(d); return p; } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index a8644d3e07..bcd1ceb4c4 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -269,8 +269,8 @@ public: wxDouble x2, wxDouble y2, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); - void CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + void CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); @@ -639,8 +639,8 @@ public : const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; @@ -776,18 +776,18 @@ wxGDIPlusPenBrushBaseData::CreateLinearGradientBrush( void wxGDIPlusPenBrushBaseData::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { m_brushPath = new GraphicsPath(); - m_brushPath->AddEllipse( (REAL)(xc-radius), (REAL)(yc-radius), + m_brushPath->AddEllipse( (REAL)(endX-radius), (REAL)(endY-radius), (REAL)(2*radius), (REAL)(2*radius)); PathGradientBrush * const brush = new PathGradientBrush(m_brushPath); - brush->SetCenterPoint(PointF(xo, yo)); + brush->SetCenterPoint(PointF(startX, startY)); brush->SetCenterColor(wxColourToColor(stops.GetStartColour())); const Color col(wxColourToColor(stops.GetEndColour())); @@ -2701,8 +2701,8 @@ wxGDIPlusRenderer::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, } wxGraphicsBrush -wxGDIPlusRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, +wxGDIPlusRenderer::CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) @@ -2710,7 +2710,7 @@ wxGDIPlusRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, ENSURE_LOADED_OR_RETURN(wxNullGraphicsBrush); wxGraphicsBrush p; wxGDIPlusBrushData* d = new wxGDIPlusBrushData( this ); - d->CreateRadialGradientBrush(xo,yo,xc,yc,radius,stops,matrix); + d->CreateRadialGradientBrush(startX,startY,endX,endY,radius,stops,matrix); p.SetRefData(d); return p; } diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 67febac98d..805b1d9b76 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -2551,8 +2551,8 @@ public: const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); - void CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + void CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix); @@ -2608,14 +2608,14 @@ void wxD2DBrushData::CreateLinearGradientBrush( } void wxD2DBrushData::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { m_brushResourceHolder = new wxD2DRadialGradientBrushResourceHolder( - xo, yo, xc, yc, radius, stops, matrix); + startX, startY, endX, endY, radius, stops, matrix); } wxD2DBrushData* wxGetD2DBrushData(const wxGraphicsBrush& brush) @@ -4645,8 +4645,8 @@ public : const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; wxGraphicsBrush CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; @@ -4847,14 +4847,14 @@ wxGraphicsBrush wxD2DRenderer::CreateLinearGradientBrush( } wxGraphicsBrush wxD2DRenderer::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { wxD2DBrushData* brushData = new wxD2DBrushData(this); - brushData->CreateRadialGradientBrush(xo, yo, xc, yc, radius, stops, matrix); + brushData->CreateRadialGradientBrush(startX, startY, endX, endY, radius, stops, matrix); wxGraphicsBrush brush; brush.SetRefData(brushData); diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 9d48d2f106..d137f81d4e 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -490,8 +490,8 @@ public: wxDouble x2, wxDouble y2, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix); - void CreateRadialGradientShading(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble radius, + void CreateRadialGradientShading(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix); @@ -597,16 +597,16 @@ wxMacCoreGraphicsPenBrushDataBase::CreateLinearGradientShading( void wxMacCoreGraphicsPenBrushDataBase::CreateRadialGradientShading( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { m_gradientFunction = CreateGradientFunction(stops); m_shading = CGShadingCreateRadial( wxMacGetGenericRGBColorSpace(), - CGPointMake((CGFloat) xo, (CGFloat) yo), 0, - CGPointMake((CGFloat) xc, (CGFloat) yc), (CGFloat) radius, + CGPointMake((CGFloat) startX, (CGFloat) startY), 0, + CGPointMake((CGFloat) endX, (CGFloat) endY), (CGFloat) radius, m_gradientFunction, true, true ); m_isShading = true; if (! matrix.IsNull() ) @@ -2766,8 +2766,8 @@ public : const wxGraphicsMatrix& matrix) wxOVERRIDE; virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) wxOVERRIDE; @@ -3032,15 +3032,15 @@ wxMacCoreGraphicsRenderer::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, } wxGraphicsBrush -wxMacCoreGraphicsRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, +wxMacCoreGraphicsRenderer::CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix) { wxGraphicsBrush p; wxMacCoreGraphicsBrushData* d = new wxMacCoreGraphicsBrushData( this ); - d->CreateRadialGradientShading(xo, yo, xc, yc, radius, stops, matrix); + d->CreateRadialGradientShading(startX, startY, endX, endY, radius, stops, matrix); p.SetRefData(d); return p; } diff --git a/src/qt/graphics.cpp b/src/qt/graphics.cpp index 8a9059cced..6470256314 100644 --- a/src/qt/graphics.cpp +++ b/src/qt/graphics.cpp @@ -91,12 +91,12 @@ public: m_brush = QBrush(gradient); } - void CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + void CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops) { - QRadialGradient gradient(QPointF(xc, yc), radius, QPointF(xo, yo)); + QRadialGradient gradient(QPointF(endX, endY), radius, QPointF(startX, startY)); SetStops(gradient, stops); m_brush = QBrush(gradient); } @@ -1141,8 +1141,8 @@ public: const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; virtual wxGraphicsBrush - CreateRadialGradientBrush(wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, + CreateRadialGradientBrush(wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& matrix=wxNullGraphicsMatrix) wxOVERRIDE; @@ -1287,14 +1287,14 @@ wxGraphicsBrush wxQtGraphicsRenderer::CreateLinearGradientBrush( } wxGraphicsBrush wxQtGraphicsRenderer::CreateRadialGradientBrush( - wxDouble xo, wxDouble yo, - wxDouble xc, wxDouble yc, wxDouble r, + wxDouble startX, wxDouble startY, + wxDouble endX, wxDouble endY, wxDouble r, const wxGraphicsGradientStops& stops, const wxGraphicsMatrix& WXUNUSED(matrix)) { wxGraphicsBrush p; wxQtBrushData* d = new wxQtBrushData(this); - d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops); + d->CreateRadialGradientBrush(startX, startY, endX, endY, r, stops); p.SetRefData(d); return p; }