Rename some *GradientBrush to *GradientPattern

This commit is contained in:
Robin Dunn
2019-07-31 16:23:21 -07:00
parent e297b5ded9
commit c860d50888

View File

@@ -260,12 +260,12 @@ public:
virtual void Apply( wxGraphicsContext* context ); virtual void Apply( wxGraphicsContext* context );
void CreateLinearGradientBrush(wxDouble x1, wxDouble y1, void CreateLinearGradientPattern(wxDouble x1, wxDouble y1,
wxDouble x2, wxDouble y2, wxDouble x2, wxDouble y2,
const wxGraphicsGradientStops& stops); const wxGraphicsGradientStops& stops);
void CreateRadialGradientBrush(wxDouble xo, wxDouble yo, void CreateRadialGradientPattern(wxDouble xo, wxDouble yo,
wxDouble xc, wxDouble yc, wxDouble radius, wxDouble xc, wxDouble yc, wxDouble radius,
const wxGraphicsGradientStops& stops); const wxGraphicsGradientStops& stops);
protected: protected:
// Call this to use the given bitmap as stipple. Bitmap must be non-null // Call this to use the given bitmap as stipple. Bitmap must be non-null
@@ -275,7 +275,7 @@ protected:
// Call this to use the given hatch style. Hatch style must be valid. // Call this to use the given hatch style. Hatch style must be valid.
void InitHatch(wxHatchStyle hatchStyle); void InitHatch(wxHatchStyle hatchStyle);
// common part of Create{Linear,Radial}GradientBrush() // common part of Create{Linear,Radial}GradientPattern()
void AddGradientStops(const wxGraphicsGradientStops& stops); void AddGradientStops(const wxGraphicsGradientStops& stops);
double m_red; double m_red;
@@ -746,9 +746,9 @@ void wxCairoPenBrushBaseData::AddGradientStops(const wxGraphicsGradientStops& st
} }
void void
wxCairoPenBrushBaseData::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, wxCairoPenBrushBaseData::CreateLinearGradientPattern(wxDouble x1, wxDouble y1,
wxDouble x2, wxDouble y2, wxDouble x2, wxDouble y2,
const wxGraphicsGradientStops& stops) const wxGraphicsGradientStops& stops)
{ {
m_pattern = cairo_pattern_create_linear(x1,y1,x2,y2); m_pattern = cairo_pattern_create_linear(x1,y1,x2,y2);
@@ -756,10 +756,10 @@ wxCairoPenBrushBaseData::CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
} }
void void
wxCairoPenBrushBaseData::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, wxCairoPenBrushBaseData::CreateRadialGradientPattern(wxDouble xo, wxDouble yo,
wxDouble xc, wxDouble yc, wxDouble xc, wxDouble yc,
wxDouble radius, wxDouble radius,
const wxGraphicsGradientStops& stops) const wxGraphicsGradientStops& stops)
{ {
m_pattern = cairo_pattern_create_radial(xo,yo,0.0,xc,yc,radius); m_pattern = cairo_pattern_create_radial(xo,yo,0.0,xc,yc,radius);
@@ -3169,7 +3169,7 @@ wxCairoRenderer::CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
wxGraphicsBrush p; wxGraphicsBrush p;
ENSURE_LOADED_OR_RETURN(p); ENSURE_LOADED_OR_RETURN(p);
wxCairoBrushData* d = new wxCairoBrushData( this ); wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateLinearGradientBrush(x1, y1, x2, y2, stops); d->CreateLinearGradientPattern(x1, y1, x2, y2, stops);
p.SetRefData(d); p.SetRefData(d);
return p; return p;
} }
@@ -3182,7 +3182,7 @@ wxCairoRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
wxGraphicsBrush p; wxGraphicsBrush p;
ENSURE_LOADED_OR_RETURN(p); ENSURE_LOADED_OR_RETURN(p);
wxCairoBrushData* d = new wxCairoBrushData( this ); wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops); d->CreateRadialGradientPattern(xo, yo, xc, yc, r, stops);
p.SetRefData(d); p.SetRefData(d);
return p; return p;
} }