summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2018-03-19 15:03:15 -0400
committerKurt <kurt.w.jung@gmail.com>2018-03-19 15:03:15 -0400
commit787a5891ca0647c8ee4fc0fd8851e26cbd353224 (patch)
tree64c42da684e870127ac44ebff74fb0601a63abd0
parenta5d7759a7bc697ddb0a744ab67c1daa4a87e4c8b (diff)
Change StatePut to method of StateType named Put
-rw-r--r--grid.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/grid.go b/grid.go
index ab042cc..6b0a511 100644
--- a/grid.go
+++ b/grid.go
@@ -44,7 +44,7 @@ func StateGet(pdf *Fpdf) (st StateType) {
// StatePut sets the common state values contained in the state structure
// specified by st.
-func StatePut(pdf *Fpdf, st StateType) {
+func (st StateType) Put(pdf *Fpdf) {
pdf.SetDrawColor(st.clrDraw.R, st.clrDraw.G, st.clrDraw.B)
pdf.SetFillColor(st.clrFill.R, st.clrFill.G, st.clrFill.B)
pdf.SetTextColor(st.clrText.R, st.clrText.G, st.clrText.B)
@@ -346,7 +346,7 @@ func (g GridType) Grid(pdf *Fpdf) {
}
// Restore drawing attributes
- StatePut(pdf, st)
+ st.Put(pdf)
}