From 38b7f7ede935e3d2a0283bb0eeb5af0541336b8a Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 26 Mar 2018 07:37:05 -0400 Subject: Clarify documentation for RGBType and RGBAType --- grid.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'grid.go') diff --git a/grid.go b/grid.go index e1f2b03..8e0cdfb 100644 --- a/grid.go +++ b/grid.go @@ -7,20 +7,20 @@ import ( func unused(args ...interface{}) { } -// RGBType holds fields for red, green and blue color components +// RGBType holds fields for red, green and blue color components (0..255) type RGBType struct { R, G, B int } -// RGBAType holds fields for red, green and blue color components and an alpha -// transparency value +// RGBAType holds fields for red, green and blue color components (0..255) and +// an alpha transparency value (0..1) type RGBAType struct { R, G, B int Alpha float64 } // StateType holds various commonly used drawing values for convenient -// retrieval and restore methods +// retrieval (StateGet()) and restore (Put) methods. type StateType struct { clrDraw, clrText, clrFill RGBType lineWd float64 @@ -42,7 +42,7 @@ func StateGet(pdf *Fpdf) (st StateType) { return } -// StatePut sets the common state values contained in the state structure +// Put sets the common state values contained in the state structure // specified by st. func (st StateType) Put(pdf *Fpdf) { pdf.SetDrawColor(st.clrDraw.R, st.clrDraw.G, st.clrDraw.B) -- cgit v1.2.1-24-ge1ad