summaryrefslogtreecommitdiff
path: root/def.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-08-24 16:11:53 -0400
committerKurt Jung <kurt.w.jung@code.google.com>2013-08-24 16:11:53 -0400
commit2794792c13f56dbb2bbabe2c640b9ee29117709f (patch)
treec70c3d0f07ba6a20b783e49e701fff8b04df7a64 /def.go
parent1fd34b058bc3f9408613f027fa3bb0795fdff2a6 (diff)
Added PageSize() and NewCustom() methods
Diffstat (limited to 'def.go')
-rw-r--r--def.go22
1 files changed, 13 insertions, 9 deletions
diff --git a/def.go b/def.go
index 7272f73..49129c7 100644
--- a/def.go
+++ b/def.go
@@ -36,12 +36,15 @@ type gradientType struct {
objNum int
}
-type sizeType struct {
- wd, ht float64
+// Wd and Ht specify the horizontal and vertical extents of a document page.
+type SizeType struct {
+ Wd, Ht float64
}
-type pointType struct {
- x, y float64
+// X and Y specify the horizontal and vertical coordinates of a point,
+// typically used in drawing.
+type PointType struct {
+ X, Y float64
}
type imageInfoType struct {
@@ -86,10 +89,11 @@ type Fpdf struct {
k float64 // scale factor (number of points in user unit)
defOrientation string // default orientation
curOrientation string // current orientation
- stdpageSizes map[string]sizeType // standard page sizes
- defPageSize sizeType // default page size
- curPageSize sizeType // current page size
- pageSizes map[int]sizeType // used for pages with non default sizes or orientations
+ stdPageSizes map[string]SizeType // standard page sizes
+ defPageSize SizeType // default page size
+ curPageSize SizeType // current page size
+ pageSizes map[int]SizeType // used for pages with non default sizes or orientations
+ unitStr string // unit of measure for all rendered objects except fonts
wPt, hPt float64 // dimensions of current page in points
w, h float64 // dimensions of current page in user unit
lMargin float64 // left margin
@@ -141,7 +145,7 @@ type Fpdf struct {
blendList []blendModeType // slice[idx] of alpha transparency modes, 1-based
blendMap map[string]int // map into blendList
gradientList []gradientType // slice[idx] of gradient records
- clipActive bool // clippping operation is underway
+ clipNest int // Number of active clipping contexts
err error // Set if error occurs during life cycle of instance
}