v0.0.496 wpdf fixes and wpdf test.go
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 4m58s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 4m58s
This commit is contained in:
@@ -16,6 +16,7 @@ type PDFRectOpt struct {
|
||||
radiusTR *float64
|
||||
radiusBR *float64
|
||||
radiusBL *float64
|
||||
debug *bool
|
||||
}
|
||||
|
||||
func NewPDFRectOpt() *PDFRectOpt {
|
||||
@@ -90,6 +91,11 @@ func (opt *PDFRectOpt) Alpha(alpha float64, blendMode PDFBlendMode) *PDFRectOpt
|
||||
return opt
|
||||
}
|
||||
|
||||
func (opt *PDFRectOpt) Debug(v bool) *PDFRectOpt {
|
||||
opt.debug = &v
|
||||
return opt
|
||||
}
|
||||
|
||||
func (b *WPDFBuilder) Rect(w float64, h float64, styleStr PDFRectStyle, opts ...*PDFRectOpt) {
|
||||
x := b.GetX()
|
||||
y := b.GetY()
|
||||
@@ -101,6 +107,7 @@ func (b *WPDFBuilder) Rect(w float64, h float64, styleStr PDFRectStyle, opts ...
|
||||
radiusTR := float64(0)
|
||||
radiusBR := float64(0)
|
||||
radiusBL := float64(0)
|
||||
debug := b.debug
|
||||
|
||||
for _, opt := range opts {
|
||||
x = langext.Coalesce(opt.x, x)
|
||||
@@ -113,6 +120,7 @@ func (b *WPDFBuilder) Rect(w float64, h float64, styleStr PDFRectStyle, opts ...
|
||||
radiusTR = langext.Coalesce(opt.radiusTR, radiusTR)
|
||||
radiusBR = langext.Coalesce(opt.radiusBR, radiusBR)
|
||||
radiusBL = langext.Coalesce(opt.radiusBL, radiusBL)
|
||||
debug = langext.Coalesce(opt.debug, debug)
|
||||
}
|
||||
|
||||
if lineWidth != nil {
|
||||
|
Reference in New Issue
Block a user