updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+9 -9
View File
@@ -95,12 +95,12 @@ func (opt *PDFCellOpt) FontSize(v float64) *PDFCellOpt {
}
func (opt *PDFCellOpt) Bold() *PDFCellOpt {
opt.fontStyleOverride = langext.Ptr(Bold)
opt.fontStyleOverride = new(Bold)
return opt
}
func (opt *PDFCellOpt) Italic() *PDFCellOpt {
opt.fontStyleOverride = langext.Ptr(Italic)
opt.fontStyleOverride = new(Italic)
return opt
}
@@ -125,32 +125,32 @@ func (opt *PDFCellOpt) AutoWidthPaddingX(v float64) *PDFCellOpt {
}
func (opt *PDFCellOpt) TextColor(cr, cg, cb int) *PDFCellOpt {
opt.textColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.textColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFCellOpt) TextColorHex(c uint32) *PDFCellOpt {
opt.textColor = langext.Ptr(hexToColor(c))
opt.textColor = new(hexToColor(c))
return opt
}
func (opt *PDFCellOpt) BorderColor(cr, cg, cb int) *PDFCellOpt {
opt.borderColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.borderColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFCellOpt) BorderColorHex(c uint32) *PDFCellOpt {
opt.borderColor = langext.Ptr(hexToColor(c))
opt.borderColor = new(hexToColor(c))
return opt
}
func (opt *PDFCellOpt) FillColor(cr, cg, cb int) *PDFCellOpt {
opt.fillColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.fillColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFCellOpt) FillColorHex(c uint32) *PDFCellOpt {
opt.fillColor = langext.Ptr(hexToColor(c))
opt.fillColor = new(hexToColor(c))
return opt
}
@@ -248,7 +248,7 @@ func (b *WPDFBuilder) Cell(txt string, opts ...*PDFCellOpt) {
if height == nil {
// (do after SetFont, so that b.cellHeight is correctly set to fontOverride)
height = langext.Ptr(b.cellHeight + b.cellSpacing)
height = new(b.cellHeight + b.cellSpacing)
}
if textColor != nil {
+5 -5
View File
@@ -23,12 +23,12 @@ func (opt *PDFLineOpt) LineWidth(v float64) *PDFLineOpt {
}
func (opt *PDFLineOpt) DrawColor(cr, cg, cb int) *PDFLineOpt {
opt.drawColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.drawColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFLineOpt) DrawColorHex(c uint32) *PDFLineOpt {
opt.drawColor = langext.Ptr(hexToColor(c))
opt.drawColor = new(hexToColor(c))
return opt
}
@@ -38,17 +38,17 @@ func (opt *PDFLineOpt) Alpha(alpha float64, blendMode PDFBlendMode) *PDFLineOpt
}
func (opt *PDFLineOpt) CapButt() *PDFLineOpt {
opt.capStyle = langext.Ptr(CapButt)
opt.capStyle = new(CapButt)
return opt
}
func (opt *PDFLineOpt) CapSquare() *PDFLineOpt {
opt.capStyle = langext.Ptr(CapSquare)
opt.capStyle = new(CapSquare)
return opt
}
func (opt *PDFLineOpt) CapRound() *PDFLineOpt {
opt.capStyle = langext.Ptr(CapRound)
opt.capStyle = new(CapRound)
return opt
}
+8 -8
View File
@@ -75,12 +75,12 @@ func (opt *PDFMultiCellOpt) FontSize(v float64) *PDFMultiCellOpt {
}
func (opt *PDFMultiCellOpt) Bold() *PDFMultiCellOpt {
opt.fontStyleOverride = langext.Ptr(Bold)
opt.fontStyleOverride = new(Bold)
return opt
}
func (opt *PDFMultiCellOpt) Italic() *PDFMultiCellOpt {
opt.fontStyleOverride = langext.Ptr(Italic)
opt.fontStyleOverride = new(Italic)
return opt
}
@@ -95,32 +95,32 @@ func (opt *PDFMultiCellOpt) X(v float64) *PDFMultiCellOpt {
}
func (opt *PDFMultiCellOpt) TextColor(cr, cg, cb int) *PDFMultiCellOpt {
opt.textColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.textColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFMultiCellOpt) TextColorHex(c uint32) *PDFMultiCellOpt {
opt.textColor = langext.Ptr(hexToColor(c))
opt.textColor = new(hexToColor(c))
return opt
}
func (opt *PDFMultiCellOpt) BorderColor(cr, cg, cb int) *PDFMultiCellOpt {
opt.borderColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.borderColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFMultiCellOpt) BorderColorHex(c uint32) *PDFMultiCellOpt {
opt.borderColor = langext.Ptr(hexToColor(c))
opt.borderColor = new(hexToColor(c))
return opt
}
func (opt *PDFMultiCellOpt) FillColor(cr, cg, cb int) *PDFMultiCellOpt {
opt.fillColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.fillColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFMultiCellOpt) FillColorHex(c uint32) *PDFMultiCellOpt {
opt.fillColor = langext.Ptr(hexToColor(c))
opt.fillColor = new(hexToColor(c))
return opt
}
+4 -4
View File
@@ -39,22 +39,22 @@ func (opt *PDFRectOpt) LineWidth(v float64) *PDFRectOpt {
}
func (opt *PDFRectOpt) DrawColor(cr, cg, cb int) *PDFRectOpt {
opt.drawColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.drawColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFRectOpt) DrawColorHex(c uint32) *PDFRectOpt {
opt.drawColor = langext.Ptr(hexToColor(c))
opt.drawColor = new(hexToColor(c))
return opt
}
func (opt *PDFRectOpt) FillColor(cr, cg, cb int) *PDFRectOpt {
opt.fillColor = langext.Ptr(rgbToColor(cr, cg, cb))
opt.fillColor = new(rgbToColor(cr, cg, cb))
return opt
}
func (opt *PDFRectOpt) FillColorHex(c uint32) *PDFRectOpt {
opt.fillColor = langext.Ptr(hexToColor(c))
opt.fillColor = new(hexToColor(c))
return opt
}
+1 -1
View File
@@ -339,7 +339,7 @@ func defaultTableStyle() *TableCellStyleOpt {
FillColorHex(uint32(0xF0F0F0)).
TextColorHex(uint32(0x000000)).
FillBackground(true),
minWidth: langext.Ptr(float64(5)),
minWidth: new(float64(5)),
ellipsize: langext.PTrue,
multiCell: langext.PFalse,
}
+8 -8
View File
@@ -117,12 +117,12 @@ func (o *TableCellStyleOpt) FontSize(v float64) *TableCellStyleOpt {
}
func (o *TableCellStyleOpt) Bold() *TableCellStyleOpt {
o.PDFCellOpt.fontStyleOverride = langext.Ptr(Bold)
o.PDFCellOpt.fontStyleOverride = new(Bold)
return o
}
func (o *TableCellStyleOpt) Italic() *TableCellStyleOpt {
o.PDFCellOpt.fontStyleOverride = langext.Ptr(Italic)
o.PDFCellOpt.fontStyleOverride = new(Italic)
return o
}
@@ -147,32 +147,32 @@ func (o *TableCellStyleOpt) AutoWidthPaddingX(v float64) *TableCellStyleOpt {
}
func (o *TableCellStyleOpt) TextColor(cr, cg, cb int) *TableCellStyleOpt {
o.PDFCellOpt.textColor = langext.Ptr(rgbToColor(cr, cg, cb))
o.PDFCellOpt.textColor = new(rgbToColor(cr, cg, cb))
return o
}
func (o *TableCellStyleOpt) TextColorHex(c uint32) *TableCellStyleOpt {
o.PDFCellOpt.textColor = langext.Ptr(hexToColor(c))
o.PDFCellOpt.textColor = new(hexToColor(c))
return o
}
func (o *TableCellStyleOpt) BorderColor(cr, cg, cb int) *TableCellStyleOpt {
o.PDFCellOpt.borderColor = langext.Ptr(rgbToColor(cr, cg, cb))
o.PDFCellOpt.borderColor = new(rgbToColor(cr, cg, cb))
return o
}
func (o *TableCellStyleOpt) BorderColorHex(c uint32) *TableCellStyleOpt {
o.PDFCellOpt.borderColor = langext.Ptr(hexToColor(c))
o.PDFCellOpt.borderColor = new(hexToColor(c))
return o
}
func (o *TableCellStyleOpt) FillColor(cr, cg, cb int) *TableCellStyleOpt {
o.PDFCellOpt.fillColor = langext.Ptr(rgbToColor(cr, cg, cb))
o.PDFCellOpt.fillColor = new(rgbToColor(cr, cg, cb))
return o
}
func (o *TableCellStyleOpt) FillColorHex(c uint32) *TableCellStyleOpt {
o.PDFCellOpt.fillColor = langext.Ptr(hexToColor(c))
o.PDFCellOpt.fillColor = new(hexToColor(c))
return o
}
+2 -2
View File
@@ -50,7 +50,7 @@ func TestPDFBuilder(t *testing.T) {
TextColorHex(uint32(0x000000)).
Align(AlignHorzCenter).
Bold(),
minWidth: langext.Ptr(float64(5)),
minWidth: new(float64(5)),
ellipsize: langext.PTrue,
multiCell: langext.PFalse,
}
@@ -63,7 +63,7 @@ func TestPDFBuilder(t *testing.T) {
FillColorHex(uint32(0xC060C0)).
FillBackground(true).
TextColorHex(uint32(0x000000)),
minWidth: langext.Ptr(float64(5)),
minWidth: new(float64(5)),
ellipsize: langext.PFalse,
multiCell: langext.PTrue,
}