summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2018-03-26 07:37:05 -0400
committerKurt <kurt.w.jung@gmail.com>2018-03-26 07:37:05 -0400
commit38b7f7ede935e3d2a0283bb0eeb5af0541336b8a (patch)
treec0c8f488113b7dc0ead7e81d8efdc22363e53649
parent60bd266e886fbaac7c4dc463ccb1c064605a760e (diff)
Clarify documentation for RGBType and RGBAType
-rw-r--r--grid.go10
1 files changed, 5 insertions, 5 deletions
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)