summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-08-13 12:01:05 -0400
committerKurt Jung <kurt.w.jung@code.google.com>2013-08-13 12:01:05 -0400
commit3d921b9e0ed6dd64b81b477017d1fc79d0e77e9a (patch)
tree3f342301ebc142c2a93a8e82d056bb496c3c557e
parent5d510c1aa2c794e82c114cf0adf540f6829886d7 (diff)
Documentation updates regarding transparency
-rw-r--r--doc.go4
-rw-r--r--fpdf.go16
2 files changed, 14 insertions, 6 deletions
diff --git a/doc.go b/doc.go
index fcf9ba3..9254f30 100644
--- a/doc.go
+++ b/doc.go
@@ -37,7 +37,7 @@ Features
• Image support (JPEG, PNG and GIF)
-• Colors
+• Colors and alpha channel transparency
• Links
@@ -129,6 +129,8 @@ the font subdirectory and run the command as in the following example.
In your PDF generation code, call AddFont() to load the font and, as with the
standard fonts, SetFont() to begin using it. See tutorial 7 for an example.
+Good sources of free, open-source fonts include http://www.google.com/fonts/
+and http://dejavu-fonts.org/.
Roadmap
diff --git a/fpdf.go b/fpdf.go
index 78be090..d0dc530 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -812,14 +812,20 @@ func (f *Fpdf) Arc(x, y, rx, ry, degRotate, degStart, degEnd float64, styleStr s
}
// Set the alpha blending channel. The blending effect applies to text,
-// drawings and images. alpha must be a value between 0.0 (fully transparent)
-// to 1.0 (fully opaque). Values outside of this range result in an error.
+// drawings and images.
+//
+// alpha must be a value between 0.0 (fully transparent) to 1.0 (fully opaque).
+// Values outside of this range result in an error.
+//
// blendModeStr must be one of "Normal", "Multiply", "Screen", "Overlay",
// "Darken", "Lighten", "ColorDodge", "ColorBurn","HardLight", "SoftLight",
// "Difference", "Exclusion", "Hue", "Saturation", "Color", or "Luminosity". An
-// empty string is replaced with "Normal". To reset normal rendering after
-// applying a blending mode, call this method with alpha set to 1.0 and
-// blendModeStr set to "Normal".
+// empty string is replaced with "Normal".
+//
+// To reset normal rendering after applying a blending mode, call this method
+// with alpha set to 1.0 and blendModeStr set to "Normal".
+//
+// See tutorial 12 for an example of this function.
func (f *Fpdf) SetAlpha(alpha float64, blendModeStr string) {
if f.err != nil {
return