summaryrefslogtreecommitdiff
path: root/fpdf.go
diff options
context:
space:
mode:
authorStani <spe.stani.be@gmail.com>2015-07-04 23:41:47 +0200
committerStani <spe.stani.be@gmail.com>2015-07-04 23:41:47 +0200
commit03a1cf12fe3ebf4b3c07cbf76d7745d8caf7d897 (patch)
tree1d32e453413fd7b449f5c7a6bf3709746610a9f1 /fpdf.go
parent67354bc81b749bdaeabd5f407aa12e5aef5238ff (diff)
implement line join style
Diffstat (limited to 'fpdf.go')
-rw-r--r--fpdf.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/fpdf.go b/fpdf.go
index a650d6d..6c21210 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -574,6 +574,8 @@ func (f *Fpdf) AddPageFormat(orientationStr string, size SizeType) {
// Set line cap style to current value
// f.out("2 J")
f.outf("%d J", f.capStyle)
+ // Set line join style to current value
+ f.outf("%d j", f.joinStyle)
// Set line width
f.lineWidth = lw
f.outf("%.2f w", lw*f.k)
@@ -791,6 +793,27 @@ func (f *Fpdf) SetLineCapStyle(styleStr string) {
}
}
+// SetLineJoinStyle defines the line cap style. styleStr should be "miter",
+// "round" or "bevel". The method can be called before the first page
+// is created. The value is retained from page to page.
+func (f *Fpdf) SetLineJoinStyle(styleStr string) {
+ var joinStyle int
+ switch styleStr {
+ case "round":
+ joinStyle = 1
+ case "bevel":
+ joinStyle = 2
+ default:
+ joinStyle = 0
+ }
+ if joinStyle != f.joinStyle {
+ f.joinStyle = joinStyle
+ if f.page > 0 {
+ f.outf("%d j", f.joinStyle)
+ }
+ }
+}
+
// SetDashPattern sets the dash pattern that is used to draw lines. The
// dashArray elements are numbers that specify the lengths, in units
// established in New(), of alternating dashes and gaps. The dash phase