summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLawrence Kesteloot (lk <Lawrence Kesteloot (lk@headcode.com)>2013-11-18 18:30:56 -0800
committerLawrence Kesteloot (lk <Lawrence Kesteloot (lk@headcode.com)>2013-11-18 18:30:56 -0800
commit914b5fdb6d43919fcc8228624315826853ded0c9 (patch)
tree27b97314f3766edf55d5c2aca0f41bb66b662739
parent711954a6e56ea7359309d8853a2fb0fc3b1aa657 (diff)
Add GetCellMargin(), SetCellMargin(), and one clarifying comment.
-rw-r--r--fpdf.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/fpdf.go b/fpdf.go
index c126fbc..0a147d6 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -266,6 +266,20 @@ func (f *Fpdf) SetLeftMargin(margin float64) {
}
}
+// Return the cell margin. This is the amount of space before and after the text
+// within a cell that's left blank, and is in units passed to New(). It defaults
+// to 1mm.
+func (f *Fpdf) GetCellMargin() float64 {
+ return f.cMargin
+}
+
+// Set the cell margin. This is the amount of space before and after the text
+// within a cell that's left blank, and is in units passed to New(). It defaults
+// to 1mm.
+func (f *Fpdf) SetCellMargin(margin float64) {
+ f.cMargin = margin
+}
+
// SetFontLocation sets the location in the file system of the font and font
// definition files.
func (f *Fpdf) SetFontLocation(fontDirStr string) {
@@ -1438,7 +1452,8 @@ func (f *Fpdf) SetAcceptPageBreakFunc(fnc func() bool) {
// If automatic page breaking is enabled and the cell goes beyond the limit, a
// page break is done before outputting.
//
-// w and h specify the width and height of the cell.
+// w and h specify the width and height of the cell. If w is 0, it will be set
+// to the remaining horizontal space on the page (until the right margin).
//
// txtStr specifies the text to display.
//