From 5d510c1aa2c794e82c114cf0adf540f6829886d7 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 13 Aug 2013 11:41:22 -0400 Subject: Added support with example for transparency in a variety of blending modes. This was adapted from the FPDF transparency script by Martin Hall-May. --- def.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'def.go') 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 } -- cgit v1.2.1-24-ge1ad