From 62eb6793c7526109807d0dd37fbec2969f512dcf Mon Sep 17 00:00:00 2001 From: Thomas Friedel Date: Tue, 8 May 2018 20:58:34 +0200 Subject: [PATCH] updated doc --- canvas.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/canvas.go b/canvas.go index a6ecf4a..ba7d7db 100644 --- a/canvas.go +++ b/canvas.go @@ -299,12 +299,18 @@ func glError() error { return nil } -// SetFillStyle sets the color, gradient, or image for any fill calls +// SetFillStyle sets the color, gradient, or image for any fill calls. To set a +// color, there are several acceptable formats: 3 or 4 int values for RGB(A) in +// the range 0-255, 3 or 4 float values for RGB(A) in the range 0-1, hex strings +// in the format "#AABBCC", "#AABBCCDD", "#ABC", or "#ABCD" func (cv *Canvas) SetFillStyle(value ...interface{}) { cv.state.fill = parseStyle(value...) } -// SetStrokeStyle sets the color, gradient, or image for any line drawing calls +// SetStrokeStyle sets the color, gradient, or image for any line drawing calls. +// To set a color, there are several acceptable formats: 3 or 4 int values for +// RGB(A) in the range 0-255, 3 or 4 float values for RGB(A) in the range 0-1, +// hex strings in the format "#AABBCC", "#AABBCCDD", "#ABC", or "#ABCD" func (cv *Canvas) SetStrokeStyle(value ...interface{}) { cv.state.stroke = parseStyle(value...) }