summaryrefslogtreecommitdiff
path: root/def.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-08-13 11:41:22 -0400
committerKurt Jung <kurt.w.jung@code.google.com>2013-08-13 11:41:22 -0400
commit5d510c1aa2c794e82c114cf0adf540f6829886d7 (patch)
treeb003af7112a22e79ed4089999538d552b9cc4c95 /def.go
parente77eb348899dca9a071f7c674cca4ea2bcc238c8 (diff)
Added support with example for transparency in a variety of blending modes.
This was adapted from the FPDF transparency script by Martin Hall-May.
Diffstat (limited to 'def.go')
-rw-r--r--def.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/def.go b/def.go
index 6d0e83a..ca31526 100644
--- a/def.go
+++ b/def.go
@@ -24,6 +24,11 @@ const (
FPDF_VERSION = "1.7"
)
+type blendModeType struct {
+ strokeStr, fillStr, modeStr string
+ objNum int
+}
+
type sizeType struct {
wd, ht float64
}
@@ -122,6 +127,8 @@ type Fpdf struct {
fontDirStr string // location of font definition files
capStyle int // line cap style: butt 0, round 1, square 2
joinStyle int // line segment join style: miter 0, round 1, bevel 2
+ blendList []blendModeType // slice[idx] of alpha transparency modes, 1-based
+ blendMap map[string]int // map into blendList
err error // Set if error occurs during life cycle of instance
}