diff options
author | Kurt Jung <kurt.w.jung@code.google.com> | 2013-11-15 08:04:58 -0500 |
---|---|---|
committer | Kurt Jung <kurt.w.jung@code.google.com> | 2013-11-15 08:04:58 -0500 |
commit | 807441a526f9094d3c099d422542252a4a0ec964 (patch) | |
tree | e052b014f848ea09953116449a1c6dfdeab07d44 /def.go | |
parent | 18a535033a6b0b584b7fb1bb6a21a7c980207aa4 (diff) |
Brush some lint off using github.com/golang/lint. This includes one breaking change: WriteLinkID instead of WriteLinkId.
Diffstat (limited to 'def.go')
-rw-r--r-- | def.go | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -22,7 +22,7 @@ import ( // Version of FPDF from which this package is derived const ( - FPDF_VERSION = "1.7" + cnFpdfVersion = "1.7" ) type blendModeType struct { @@ -37,17 +37,19 @@ type gradientType struct { objNum int } -// Wd and Ht specify the horizontal and vertical extents of a document page. +// SizeType fields Wd and Ht specify the horizontal and vertical extents of a +// document element such as a page. type SizeType struct { Wd, Ht float64 } -// X and Y specify the horizontal and vertical coordinates of a point, -// typically used in drawing. +// PointType fields X and Y specify the horizontal and vertical coordinates of +// a point, typically used in drawing. type PointType struct { X, Y float64 } +// ImageInfoType contains size, color and other information about an image type ImageInfoType struct { data []byte smask []byte @@ -64,17 +66,18 @@ type ImageInfoType struct { scale float64 // document scaling factor } -// The width and height of the image in the units of the Fpdf object. +// Extent returns the width and height of the image in the units of the Fpdf +// object. func (info *ImageInfoType) Extent() (wd, ht float64) { return info.w / info.scale, info.h / info.scale } -// The width of the image in the units of the Fpdf object. +// Width returns the width of the image in the units of the Fpdf object. func (info *ImageInfoType) Width() float64 { return info.w / info.scale } -// The height of the image in the units of the Fpdf object. +// Height returns the height of the image in the units of the Fpdf object. func (info *ImageInfoType) Height() float64 { return info.h / info.scale } @@ -116,7 +119,7 @@ type InitType struct { FontDirStr string } -// Principal structure for creating a single PDF document +// Fpdf is the principal structure for creating a single PDF document type Fpdf struct { page int // current page number n int // current object number |