summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2015-02-09 14:02:56 -0500
committerKurt Jung <kurt.w.jung@code.google.com>2015-02-09 14:02:56 -0500
commit5f8ef3772bf9215f5cd2bc82ab922497e27b58c4 (patch)
tree0d37753f9dfdf0b80950c679cfc73cff59cae4b3
parentbcd04ae344fd396cb73a139ecb24c3f5bb7e220a (diff)
Note about cell margin's effect on GetX
-rw-r--r--fpdf.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/fpdf.go b/fpdf.go
index 2f25e32..3f6f511 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -2261,11 +2261,20 @@ func (f *Fpdf) RegisterImage(fileStr, tp string) (info *ImageInfoType) {
}
// GetXY returns the abscissa and ordinate of the current position.
+//
+// Note: the value returned for the abscissa will be affected by the current
+// cell margin. To account for this, you may need to either add the value
+// returned by GetCellMargin() to it or call SetCellMargin(0) to remove the
+// cell margin.
func (f *Fpdf) GetXY() (float64, float64) {
return f.x, f.y
}
// GetX returns the abscissa of the current position.
+//
+// Note: the value returned will be affected by the current cell margin. To
+// account for this, you may need to either add the value returned by
+// GetCellMargin() to it or call SetCellMargin(0) to remove the cell margin.
func (f *Fpdf) GetX() float64 {
return f.x
}