summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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