From a36c6353678ea7fb043aebb1b6a66f69267f70cb Mon Sep 17 00:00:00 2001 From: Thomas Friedel Date: Fri, 22 Feb 2019 16:55:48 +0100 Subject: [PATCH] renamed the gradient creation methods; removed SetLineEnd function --- canvas.go | 5 ----- gradients.go | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/canvas.go b/canvas.go index ba55f8c..c6c1c45 100644 --- a/canvas.go +++ b/canvas.go @@ -341,11 +341,6 @@ func (cv *Canvas) SetLineJoin(join lineJoin) { cv.state.lineJoin = join } -// SetLineEnd is a synonym for SetLineCap that was misnamed by mistake. Deprecated -func (cv *Canvas) SetLineEnd(cap lineCap) { - cv.SetLineCap(cap) -} - // SetLineCap sets the style of line endings for rendering a path with Stroke // The value can be Butt, Square, or Round func (cv *Canvas) SetLineCap(cap lineCap) { diff --git a/gradients.go b/gradients.go index e6f0e46..0af8d44 100644 --- a/gradients.go +++ b/gradients.go @@ -38,10 +38,10 @@ type RadialGradient struct { data backendbase.Gradient } -// NewLinearGradient creates a new linear gradient with +// CreateLinearGradient creates a new linear gradient with // the coordinates from where to where the gradient // will apply on the canvas -func (cv *Canvas) NewLinearGradient(x0, y0, x1, y1 float64) *LinearGradient { +func (cv *Canvas) CreateLinearGradient(x0, y0, x1, y1 float64) *LinearGradient { return &LinearGradient{ cv: cv, opaque: true, @@ -51,11 +51,11 @@ func (cv *Canvas) NewLinearGradient(x0, y0, x1, y1 float64) *LinearGradient { } } -// NewRadialGradient creates a new linear gradient with +// CreateRadialGradient creates a new radial gradient with // the coordinates and the radii for two circles. The // gradient will apply from the first to the second // circle -func (cv *Canvas) NewRadialGradient(x0, y0, r0, x1, y1, r1 float64) *RadialGradient { +func (cv *Canvas) CreateRadialGradient(x0, y0, r0, x1, y1, r1 float64) *RadialGradient { return &RadialGradient{ cv: cv, opaque: true,