diff --git a/cmd/heatmap/main.go b/cmd/heatmap/main.go new file mode 100644 index 00000000..836acd0a --- /dev/null +++ b/cmd/heatmap/main.go @@ -0,0 +1,73 @@ +package main + +import ( + "github.com/johnfercher/maroto/v2" + "github.com/johnfercher/maroto/v2/pkg/components/chart" + "github.com/johnfercher/maroto/v2/pkg/components/text" + "github.com/johnfercher/maroto/v2/pkg/config" + "github.com/johnfercher/maroto/v2/pkg/props" + "log" +) + +func main() { + cfg := config.NewBuilder(). + WithPageNumber(). + WithDebug(true). + Build() + + mrt := maroto.New(cfg) + m := maroto.NewMetricsDecorator(mrt) + + xMax := 620 + yMax := 200 + max := 620 + 200 + heat := buildHeat(xMax, yMax, max) + + m.AddRows(text.NewRow(10, "HeatMap")) + m.AddRows(chart.NewHeatMapRow(100, "map", heat, props.HeatMap{ + TransparentValues: []int{0}, + InvertScale: true, + })) + + /*m.AddRow(100, + chart.NewHeatMapCol(6, "map", heat, props.HeatMap{ + TransparentValues: []int{0}, + Chart: &props.Chart{ + Axis: true, + }, + }), + chart.NewHeatMapCol(6, "map", heat, props.HeatMap{ + TransparentValues: []int{0}, + Chart: &props.Chart{ + Axis: true, + }, + }), + )*/ + + document, err := m.Generate() + if err != nil { + log.Fatal(err.Error()) + } + + err = document.Save("docs/assets/pdf/heatmap.pdf") + if err != nil { + log.Fatal(err.Error()) + } + + err = document.GetReport().Save("docs/assets/text/heatmap.txt") + if err != nil { + log.Fatal(err.Error()) + } +} + +func buildHeat(x, y, max int) [][]int { + var heat [][]int + for i := 0; i < x; i++ { + var line []int + for j := 0; j < y; j++ { + line = append(line, i+j) + } + heat = append(heat, line) + } + return heat +} diff --git a/docs/assets/examples/textgrid/v2/main.go b/docs/assets/examples/textgrid/v2/main.go index 09045c47..174e185d 100644 --- a/docs/assets/examples/textgrid/v2/main.go +++ b/docs/assets/examples/textgrid/v2/main.go @@ -1,9 +1,10 @@ package main import ( - "github.com/johnfercher/maroto/v2/pkg/consts/fontstyle" "log" + "github.com/johnfercher/maroto/v2/pkg/consts/fontstyle" + "github.com/johnfercher/maroto/v2/pkg/core" "github.com/johnfercher/maroto/v2" diff --git a/docs/assets/pdf/heatmap.pdf b/docs/assets/pdf/heatmap.pdf new file mode 100755 index 00000000..0fedace6 Binary files /dev/null and b/docs/assets/pdf/heatmap.pdf differ diff --git a/docs/assets/pdf/v2.pdf b/docs/assets/pdf/v2.pdf index 0caf0fb6..22de92fd 100644 Binary files a/docs/assets/pdf/v2.pdf and b/docs/assets/pdf/v2.pdf differ diff --git a/docs/assets/text/heatmap.txt b/docs/assets/text/heatmap.txt new file mode 100644 index 00000000..ad82d5a8 --- /dev/null +++ b/docs/assets/text/heatmap.txt @@ -0,0 +1,3 @@ +generate -> avg: 120.35ms, executions: [120.35ms] +add_rows -> avg: 6520.50ns, executions: [12.88μs, 0.17μs] +file_size -> 6.41Mb diff --git a/docs/assets/text/v2.txt b/docs/assets/text/v2.txt index 09a02a22..82b263a8 100644 --- a/docs/assets/text/v2.txt +++ b/docs/assets/text/v2.txt @@ -1,5 +1,5 @@ -generate -> avg: 18.06ms, executions: [18.06ms] -header -> avg: 356.00ns, executions: [356.00ns] -footer -> avg: 71.00ns, executions: [71.00ns] -add_row -> avg: 112.55ns, executions: [0.11μs, 0.15μs, 0.05μs, 0.08μs, 0.02μs, 0.02μs, 0.53μs, 0.06μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.03μs, 1.41μs, 0.06μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.01μs, 0.07μs, 0.02μs, 0.02μs, 0.03μs, 0.29μs, 1.74μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.02μs, 0.24μs, 0.05μs, 0.02μs, 0.07μs, 0.02μs, 0.01μs, 0.02μs, 0.06μs, 0.03μs, 0.01μs, 0.01μs, 0.24μs, 0.05μs, 0.01μs, 0.05μs, 0.02μs] -file_size -> 267.93Kb +generate -> avg: 26.67ms, executions: [26.67ms] +header -> avg: 21.00μs, executions: [21.00μs] +footer -> avg: 333.00ns, executions: [333.00ns] +add_rows -> avg: 157.56ns, executions: [0.29μs, 0.50μs, 0.29μs, 0.50μs, 0.08μs, 0.12μs, 1.21μs, 0.17μs, 0.04μs, 0.08μs, 0.04μs, 0.04μs, 0.04μs, 0.21μs, 0.04μs, 0.04μs, 0.04μs, 0.67μs, 0.17μs, 0.04μs, 0.12μs, 0.04μs, 0.04μs, 0.04μs, 0.17μs, 0.04μs, 0.04μs, 0.04μs, 0.50μs, 0.12μs, 0.04μs, 0.12μs, 0.04μs, 0.21μs, 0.04μs, 0.12μs, 0.04μs, 0.04μs, 0.08μs, 0.50μs, 0.17μs, 0.04μs, 0.08μs, 0.04μs, 0.04μs, 0.04μs, 0.33μs, 0.04μs, 0.04μs, 0.04μs, 0.46μs, 0.08μs, 0.04μs, 0.12μs, 0.04μs] +file_size -> 282.23Kb diff --git a/internal/providers/gofpdf/builder.go b/internal/providers/gofpdf/builder.go index 6aa59f2e..3de3c609 100644 --- a/internal/providers/gofpdf/builder.go +++ b/internal/providers/gofpdf/builder.go @@ -20,6 +20,7 @@ type Dependencies struct { Code core.Code Image core.Image Line core.Line + HeatMap core.HeatMap Cache cache.Cache CellWriter cellwriter.CellWriter Cfg *entity.Config @@ -68,6 +69,8 @@ func (b *builder) Build(cfg *entity.Config, cache cache.Cache) *Dependencies { text := NewText(fpdf, math, font) image := NewImage(fpdf, math) line := NewLine(fpdf) + chart := NewChart(fpdf, line, text) + heatMap := NewHeatMap(fpdf, chart) cellWriter := cellwriter.NewBuilder(). Build(fpdf) @@ -78,6 +81,7 @@ func (b *builder) Build(cfg *entity.Config, cache cache.Cache) *Dependencies { Code: code, Image: image, Line: line, + HeatMap: heatMap, CellWriter: cellWriter, Cfg: cfg, Cache: cache, diff --git a/internal/providers/gofpdf/chart.go b/internal/providers/gofpdf/chart.go new file mode 100644 index 00000000..d0747225 --- /dev/null +++ b/internal/providers/gofpdf/chart.go @@ -0,0 +1,44 @@ +package gofpdf + +import ( + "github.com/johnfercher/maroto/v2/internal/providers/gofpdf/gofpdfwrapper" + "github.com/johnfercher/maroto/v2/pkg/consts/linestyle" + "github.com/johnfercher/maroto/v2/pkg/consts/orientation" + "github.com/johnfercher/maroto/v2/pkg/core" + "github.com/johnfercher/maroto/v2/pkg/core/entity" + "github.com/johnfercher/maroto/v2/pkg/props" +) + +type chart struct { + pdf gofpdfwrapper.Fpdf + line core.Line + text core.Text +} + +func NewChart(pdf gofpdfwrapper.Fpdf, line core.Line, text core.Text) *chart { + return &chart{ + pdf: pdf, + line: line, + text: text, + } +} + +func (c *chart) Add(cell *entity.Cell, margins *entity.Margins, prop *props.Chart) { + // X + c.line.Add(cell, &props.Line{ + Orientation: orientation.Horizontal, + SizePercent: 88, + OffsetPercent: 94, + Style: linestyle.Solid, + Thickness: 0.5, + }) + + // Y + c.line.Add(cell, &props.Line{ + Orientation: orientation.Vertical, + SizePercent: 88, + OffsetPercent: 6, + Style: linestyle.Solid, + Thickness: 0.5, + }) +} diff --git a/internal/providers/gofpdf/heatmap.go b/internal/providers/gofpdf/heatmap.go new file mode 100644 index 00000000..a04bc8ba --- /dev/null +++ b/internal/providers/gofpdf/heatmap.go @@ -0,0 +1,150 @@ +package gofpdf + +import ( + "errors" + "math" + + "github.com/johnfercher/maroto/v2/pkg/props" + + "github.com/johnfercher/maroto/v2/internal/providers/gofpdf/gofpdfwrapper" + "github.com/johnfercher/maroto/v2/pkg/core" + "github.com/johnfercher/maroto/v2/pkg/core/entity" +) + +var ErrOutOfRange = errors.New("out of range") + +type heatMap struct { + pdf gofpdfwrapper.Fpdf + defaultFillColor *props.Color + chart core.Chart + padding float64 +} + +func NewHeatMap(pdf gofpdfwrapper.Fpdf, chart core.Chart) *heatMap { + return &heatMap{ + pdf: pdf, + chart: chart, + defaultFillColor: &props.WhiteColor, + padding: 0, + } +} + +func (s heatMap) Add(heatMap [][]int, cell *entity.Cell, margins *entity.Margins, prop *props.HeatMap) { + if heatMap == nil || len(heatMap) == 0 || len(heatMap[0]) == 0 { + return + } + + max := s.getMax(heatMap) + transparent := s.getTransparent(prop) + stepX, stepY := s.getSteps(heatMap, cell, prop) + + for i := 0; i < len(heatMap)-1; i++ { + for j := 0; j < len(heatMap[i])-1; j++ { + if !transparent[heatMap[i][j]] { + r, g, b := s.GetHeatColor(heatMap[i][j], max, prop.InvertScale, prop.HalfColor) + + x := float64(i)*stepX + cell.X + margins.Left + y := float64(j) * stepY + + // Invert to draw from bottom to up + y = cell.Height + margins.Top + cell.Y - y - stepY + + s.pdf.SetFillColor(r, g, b) + s.pdf.Rect(x, y, stepX, stepY, "F") + s.pdf.SetFillColor(s.defaultFillColor.Red, s.defaultFillColor.Green, s.defaultFillColor.Blue) + } + } + } + + if prop.Chart != nil { + s.chart.Add(cell, margins, prop.Chart) + } +} + +func (s heatMap) getSteps(heatMap [][]int, cell *entity.Cell, prop *props.HeatMap) (float64, float64) { + xSize := len(heatMap) + stepX := (cell.Width) / float64(xSize-1) + + ySize := len(heatMap[0]) + stepY := (cell.Height) / float64(ySize-1) + + return stepX, stepY +} + +func (s heatMap) GetHeatColor(i int, total int, invertScale bool, halfColor bool) (int, int, int) { + hueMax := 360.0 + if halfColor { + hueMax /= 2.0 + } + + offset := +60 + if total+offset < 0 { + total = 360 + offset + } else { + total = total + offset + } + + step := hueMax / float64(total) + iStep := step * float64(i) + + if invertScale { + iStep = 160 - iStep + } + + r, g, b, _ := HSVToRGB(iStep, 1.0, 1.0) + return int(r), int(g), int(b) +} + +func (s heatMap) getMax(matrix [][]int) int { + var max = 0 + for _, row := range matrix { + for _, cell := range row { + if cell > max { + max = cell + } + } + } + + return max +} + +func (s heatMap) getTransparent(p *props.HeatMap) map[int]bool { + m := make(map[int]bool) + for _, t := range p.TransparentValues { + m[t] = true + } + return m +} + +// HSVToRGB converts an HSV triple to an RGB triple. +// Source: https://github.com/Crazy3lf/colorconv/blob/master/colorconv.go +func HSVToRGB(h, s, v float64) (r, g, b uint8, err error) { + if h < 0 || h >= 360 || + s < 0 || s > 1 || + v < 0 || v > 1 { + return 0, 0, 0, ErrOutOfRange + } + // When 0 ≤ h < 360, 0 ≤ s ≤ 1 and 0 ≤ v ≤ 1: + C := v * s + X := C * (1 - math.Abs(math.Mod(h/60, 2)-1)) + m := v - C + var Rnot, Gnot, Bnot float64 + switch { + case 0 <= h && h < 60: + Rnot, Gnot, Bnot = C, X, 0 + case 60 <= h && h < 120: + Rnot, Gnot, Bnot = X, C, 0 + case 120 <= h && h < 180: + Rnot, Gnot, Bnot = 0, C, X + case 180 <= h && h < 240: + Rnot, Gnot, Bnot = 0, X, C + case 240 <= h && h < 300: + Rnot, Gnot, Bnot = X, 0, C + case 300 <= h && h < 360: + Rnot, Gnot, Bnot = C, 0, X + } + r = uint8(math.Round((Rnot + m) * 255)) + g = uint8(math.Round((Gnot + m) * 255)) + b = uint8(math.Round((Bnot + m) * 255)) + return r, g, b, nil +} diff --git a/internal/providers/gofpdf/provider.go b/internal/providers/gofpdf/provider.go index 8073abf6..96e846cc 100644 --- a/internal/providers/gofpdf/provider.go +++ b/internal/providers/gofpdf/provider.go @@ -26,6 +26,7 @@ type provider struct { code core.Code image core.Image line core.Line + heatMap core.HeatMap cache cache.Cache cellWriter cellwriter.CellWriter cfg *entity.Config @@ -40,6 +41,7 @@ func New(dep *Dependencies) core.Provider { code: dep.Code, image: dep.Image, line: dep.Line, + heatMap: dep.HeatMap, cellWriter: dep.CellWriter, cfg: dep.Cfg, cache: dep.Cache, @@ -268,6 +270,10 @@ func (g *provider) SetCompression(compression bool) { g.fpdf.SetCompression(compression) } +func (g *provider) AddHeatMap(heatMap [][]int, cell *entity.Cell, prop *props.HeatMap) { + g.heatMap.Add(heatMap, cell, g.cfg.Margins, prop) +} + func (g *provider) getBarcodeImageName(code string, prop *props.Barcode) string { if prop == nil { return code + string(barcode.Code128) diff --git a/mocks/Builder.go b/mocks/Builder.go index 883f7968..f0e129a1 100644 --- a/mocks/Builder.go +++ b/mocks/Builder.go @@ -1,14 +1,24 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks import ( - cache "github.com/johnfercher/maroto/v2/internal/cache" + config "github.com/johnfercher/maroto/v2/pkg/config" entity "github.com/johnfercher/maroto/v2/pkg/core/entity" - gofpdf "github.com/johnfercher/maroto/v2/internal/providers/gofpdf" + extension "github.com/johnfercher/maroto/v2/pkg/consts/extension" mock "github.com/stretchr/testify/mock" + + orientation "github.com/johnfercher/maroto/v2/pkg/consts/orientation" + + pagesize "github.com/johnfercher/maroto/v2/pkg/consts/pagesize" + + props "github.com/johnfercher/maroto/v2/pkg/props" + + protection "github.com/johnfercher/maroto/v2/pkg/consts/protection" + + time "time" ) // Builder is an autogenerated mock type for the Builder type @@ -24,20 +34,20 @@ func (_m *Builder) EXPECT() *Builder_Expecter { return &Builder_Expecter{mock: &_m.Mock} } -// Build provides a mock function with given fields: cfg, _a1 -func (_m *Builder) Build(cfg *entity.Config, _a1 cache.Cache) *gofpdf.Dependencies { - ret := _m.Called(cfg, _a1) +// Build provides a mock function with no fields +func (_m *Builder) Build() *entity.Config { + ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Build") } - var r0 *gofpdf.Dependencies - if rf, ok := ret.Get(0).(func(*entity.Config, cache.Cache) *gofpdf.Dependencies); ok { - r0 = rf(cfg, _a1) + var r0 *entity.Config + if rf, ok := ret.Get(0).(func() *entity.Config); ok { + r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*gofpdf.Dependencies) + r0 = ret.Get(0).(*entity.Config) } } @@ -50,25 +60,1244 @@ type Builder_Build_Call struct { } // Build is a helper method to define mock.On call -// - cfg *entity.Config -// - _a1 cache.Cache -func (_e *Builder_Expecter) Build(cfg interface{}, _a1 interface{}) *Builder_Build_Call { - return &Builder_Build_Call{Call: _e.mock.On("Build", cfg, _a1)} +func (_e *Builder_Expecter) Build() *Builder_Build_Call { + return &Builder_Build_Call{Call: _e.mock.On("Build")} +} + +func (_c *Builder_Build_Call) Run(run func()) *Builder_Build_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Builder_Build_Call) Return(_a0 *entity.Config) *Builder_Build_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_Build_Call) RunAndReturn(run func() *entity.Config) *Builder_Build_Call { + _c.Call.Return(run) + return _c +} + +// WithAuthor provides a mock function with given fields: author, isUTF8 +func (_m *Builder) WithAuthor(author string, isUTF8 bool) config.Builder { + ret := _m.Called(author, isUTF8) + + if len(ret) == 0 { + panic("no return value specified for WithAuthor") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(string, bool) config.Builder); ok { + r0 = rf(author, isUTF8) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithAuthor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithAuthor' +type Builder_WithAuthor_Call struct { + *mock.Call +} + +// WithAuthor is a helper method to define mock.On call +// - author string +// - isUTF8 bool +func (_e *Builder_Expecter) WithAuthor(author interface{}, isUTF8 interface{}) *Builder_WithAuthor_Call { + return &Builder_WithAuthor_Call{Call: _e.mock.On("WithAuthor", author, isUTF8)} +} + +func (_c *Builder_WithAuthor_Call) Run(run func(author string, isUTF8 bool)) *Builder_WithAuthor_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Builder_WithAuthor_Call) Return(_a0 config.Builder) *Builder_WithAuthor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithAuthor_Call) RunAndReturn(run func(string, bool) config.Builder) *Builder_WithAuthor_Call { + _c.Call.Return(run) + return _c +} + +// WithBackgroundImage provides a mock function with given fields: _a0, _a1 +func (_m *Builder) WithBackgroundImage(_a0 []byte, _a1 extension.Type) config.Builder { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for WithBackgroundImage") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func([]byte, extension.Type) config.Builder); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithBackgroundImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithBackgroundImage' +type Builder_WithBackgroundImage_Call struct { + *mock.Call +} + +// WithBackgroundImage is a helper method to define mock.On call +// - _a0 []byte +// - _a1 extension.Type +func (_e *Builder_Expecter) WithBackgroundImage(_a0 interface{}, _a1 interface{}) *Builder_WithBackgroundImage_Call { + return &Builder_WithBackgroundImage_Call{Call: _e.mock.On("WithBackgroundImage", _a0, _a1)} +} + +func (_c *Builder_WithBackgroundImage_Call) Run(run func(_a0 []byte, _a1 extension.Type)) *Builder_WithBackgroundImage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte), args[1].(extension.Type)) + }) + return _c +} + +func (_c *Builder_WithBackgroundImage_Call) Return(_a0 config.Builder) *Builder_WithBackgroundImage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithBackgroundImage_Call) RunAndReturn(run func([]byte, extension.Type) config.Builder) *Builder_WithBackgroundImage_Call { + _c.Call.Return(run) + return _c +} + +// WithBottomMargin provides a mock function with given fields: bottom +func (_m *Builder) WithBottomMargin(bottom float64) config.Builder { + ret := _m.Called(bottom) + + if len(ret) == 0 { + panic("no return value specified for WithBottomMargin") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(float64) config.Builder); ok { + r0 = rf(bottom) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithBottomMargin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithBottomMargin' +type Builder_WithBottomMargin_Call struct { + *mock.Call +} + +// WithBottomMargin is a helper method to define mock.On call +// - bottom float64 +func (_e *Builder_Expecter) WithBottomMargin(bottom interface{}) *Builder_WithBottomMargin_Call { + return &Builder_WithBottomMargin_Call{Call: _e.mock.On("WithBottomMargin", bottom)} +} + +func (_c *Builder_WithBottomMargin_Call) Run(run func(bottom float64)) *Builder_WithBottomMargin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(float64)) + }) + return _c +} + +func (_c *Builder_WithBottomMargin_Call) Return(_a0 config.Builder) *Builder_WithBottomMargin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithBottomMargin_Call) RunAndReturn(run func(float64) config.Builder) *Builder_WithBottomMargin_Call { + _c.Call.Return(run) + return _c +} + +// WithCompression provides a mock function with given fields: compression +func (_m *Builder) WithCompression(compression bool) config.Builder { + ret := _m.Called(compression) + + if len(ret) == 0 { + panic("no return value specified for WithCompression") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(bool) config.Builder); ok { + r0 = rf(compression) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithCompression_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithCompression' +type Builder_WithCompression_Call struct { + *mock.Call +} + +// WithCompression is a helper method to define mock.On call +// - compression bool +func (_e *Builder_Expecter) WithCompression(compression interface{}) *Builder_WithCompression_Call { + return &Builder_WithCompression_Call{Call: _e.mock.On("WithCompression", compression)} +} + +func (_c *Builder_WithCompression_Call) Run(run func(compression bool)) *Builder_WithCompression_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *Builder_WithCompression_Call) Return(_a0 config.Builder) *Builder_WithCompression_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithCompression_Call) RunAndReturn(run func(bool) config.Builder) *Builder_WithCompression_Call { + _c.Call.Return(run) + return _c +} + +// WithConcurrentMode provides a mock function with given fields: chunkWorkers +func (_m *Builder) WithConcurrentMode(chunkWorkers int) config.Builder { + ret := _m.Called(chunkWorkers) + + if len(ret) == 0 { + panic("no return value specified for WithConcurrentMode") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(int) config.Builder); ok { + r0 = rf(chunkWorkers) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithConcurrentMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithConcurrentMode' +type Builder_WithConcurrentMode_Call struct { + *mock.Call +} + +// WithConcurrentMode is a helper method to define mock.On call +// - chunkWorkers int +func (_e *Builder_Expecter) WithConcurrentMode(chunkWorkers interface{}) *Builder_WithConcurrentMode_Call { + return &Builder_WithConcurrentMode_Call{Call: _e.mock.On("WithConcurrentMode", chunkWorkers)} +} + +func (_c *Builder_WithConcurrentMode_Call) Run(run func(chunkWorkers int)) *Builder_WithConcurrentMode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *Builder_WithConcurrentMode_Call) Return(_a0 config.Builder) *Builder_WithConcurrentMode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithConcurrentMode_Call) RunAndReturn(run func(int) config.Builder) *Builder_WithConcurrentMode_Call { + _c.Call.Return(run) + return _c +} + +// WithCreationDate provides a mock function with given fields: _a0 +func (_m *Builder) WithCreationDate(_a0 time.Time) config.Builder { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for WithCreationDate") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(time.Time) config.Builder); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithCreationDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithCreationDate' +type Builder_WithCreationDate_Call struct { + *mock.Call +} + +// WithCreationDate is a helper method to define mock.On call +// - _a0 time.Time +func (_e *Builder_Expecter) WithCreationDate(_a0 interface{}) *Builder_WithCreationDate_Call { + return &Builder_WithCreationDate_Call{Call: _e.mock.On("WithCreationDate", _a0)} +} + +func (_c *Builder_WithCreationDate_Call) Run(run func(_a0 time.Time)) *Builder_WithCreationDate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(time.Time)) + }) + return _c +} + +func (_c *Builder_WithCreationDate_Call) Return(_a0 config.Builder) *Builder_WithCreationDate_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithCreationDate_Call) RunAndReturn(run func(time.Time) config.Builder) *Builder_WithCreationDate_Call { + _c.Call.Return(run) + return _c +} + +// WithCreator provides a mock function with given fields: creator, isUTF8 +func (_m *Builder) WithCreator(creator string, isUTF8 bool) config.Builder { + ret := _m.Called(creator, isUTF8) + + if len(ret) == 0 { + panic("no return value specified for WithCreator") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(string, bool) config.Builder); ok { + r0 = rf(creator, isUTF8) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithCreator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithCreator' +type Builder_WithCreator_Call struct { + *mock.Call +} + +// WithCreator is a helper method to define mock.On call +// - creator string +// - isUTF8 bool +func (_e *Builder_Expecter) WithCreator(creator interface{}, isUTF8 interface{}) *Builder_WithCreator_Call { + return &Builder_WithCreator_Call{Call: _e.mock.On("WithCreator", creator, isUTF8)} +} + +func (_c *Builder_WithCreator_Call) Run(run func(creator string, isUTF8 bool)) *Builder_WithCreator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Builder_WithCreator_Call) Return(_a0 config.Builder) *Builder_WithCreator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithCreator_Call) RunAndReturn(run func(string, bool) config.Builder) *Builder_WithCreator_Call { + _c.Call.Return(run) + return _c +} + +// WithCustomFonts provides a mock function with given fields: _a0 +func (_m *Builder) WithCustomFonts(_a0 []*entity.CustomFont) config.Builder { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for WithCustomFonts") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func([]*entity.CustomFont) config.Builder); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithCustomFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithCustomFonts' +type Builder_WithCustomFonts_Call struct { + *mock.Call +} + +// WithCustomFonts is a helper method to define mock.On call +// - _a0 []*entity.CustomFont +func (_e *Builder_Expecter) WithCustomFonts(_a0 interface{}) *Builder_WithCustomFonts_Call { + return &Builder_WithCustomFonts_Call{Call: _e.mock.On("WithCustomFonts", _a0)} +} + +func (_c *Builder_WithCustomFonts_Call) Run(run func(_a0 []*entity.CustomFont)) *Builder_WithCustomFonts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]*entity.CustomFont)) + }) + return _c +} + +func (_c *Builder_WithCustomFonts_Call) Return(_a0 config.Builder) *Builder_WithCustomFonts_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithCustomFonts_Call) RunAndReturn(run func([]*entity.CustomFont) config.Builder) *Builder_WithCustomFonts_Call { + _c.Call.Return(run) + return _c +} + +// WithDebug provides a mock function with given fields: on +func (_m *Builder) WithDebug(on bool) config.Builder { + ret := _m.Called(on) + + if len(ret) == 0 { + panic("no return value specified for WithDebug") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(bool) config.Builder); ok { + r0 = rf(on) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithDebug_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDebug' +type Builder_WithDebug_Call struct { + *mock.Call +} + +// WithDebug is a helper method to define mock.On call +// - on bool +func (_e *Builder_Expecter) WithDebug(on interface{}) *Builder_WithDebug_Call { + return &Builder_WithDebug_Call{Call: _e.mock.On("WithDebug", on)} +} + +func (_c *Builder_WithDebug_Call) Run(run func(on bool)) *Builder_WithDebug_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *Builder_WithDebug_Call) Return(_a0 config.Builder) *Builder_WithDebug_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithDebug_Call) RunAndReturn(run func(bool) config.Builder) *Builder_WithDebug_Call { + _c.Call.Return(run) + return _c +} + +// WithDefaultFont provides a mock function with given fields: font +func (_m *Builder) WithDefaultFont(font *props.Font) config.Builder { + ret := _m.Called(font) + + if len(ret) == 0 { + panic("no return value specified for WithDefaultFont") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(*props.Font) config.Builder); ok { + r0 = rf(font) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithDefaultFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDefaultFont' +type Builder_WithDefaultFont_Call struct { + *mock.Call +} + +// WithDefaultFont is a helper method to define mock.On call +// - font *props.Font +func (_e *Builder_Expecter) WithDefaultFont(font interface{}) *Builder_WithDefaultFont_Call { + return &Builder_WithDefaultFont_Call{Call: _e.mock.On("WithDefaultFont", font)} +} + +func (_c *Builder_WithDefaultFont_Call) Run(run func(font *props.Font)) *Builder_WithDefaultFont_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*props.Font)) + }) + return _c +} + +func (_c *Builder_WithDefaultFont_Call) Return(_a0 config.Builder) *Builder_WithDefaultFont_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithDefaultFont_Call) RunAndReturn(run func(*props.Font) config.Builder) *Builder_WithDefaultFont_Call { + _c.Call.Return(run) + return _c +} + +// WithDimensions provides a mock function with given fields: width, height +func (_m *Builder) WithDimensions(width float64, height float64) config.Builder { + ret := _m.Called(width, height) + + if len(ret) == 0 { + panic("no return value specified for WithDimensions") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(float64, float64) config.Builder); ok { + r0 = rf(width, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithDimensions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDimensions' +type Builder_WithDimensions_Call struct { + *mock.Call +} + +// WithDimensions is a helper method to define mock.On call +// - width float64 +// - height float64 +func (_e *Builder_Expecter) WithDimensions(width interface{}, height interface{}) *Builder_WithDimensions_Call { + return &Builder_WithDimensions_Call{Call: _e.mock.On("WithDimensions", width, height)} +} + +func (_c *Builder_WithDimensions_Call) Run(run func(width float64, height float64)) *Builder_WithDimensions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(float64), args[1].(float64)) + }) + return _c +} + +func (_c *Builder_WithDimensions_Call) Return(_a0 config.Builder) *Builder_WithDimensions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithDimensions_Call) RunAndReturn(run func(float64, float64) config.Builder) *Builder_WithDimensions_Call { + _c.Call.Return(run) + return _c +} + +// WithDisableAutoPageBreak provides a mock function with given fields: disabled +func (_m *Builder) WithDisableAutoPageBreak(disabled bool) config.Builder { + ret := _m.Called(disabled) + + if len(ret) == 0 { + panic("no return value specified for WithDisableAutoPageBreak") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(bool) config.Builder); ok { + r0 = rf(disabled) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithDisableAutoPageBreak_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDisableAutoPageBreak' +type Builder_WithDisableAutoPageBreak_Call struct { + *mock.Call +} + +// WithDisableAutoPageBreak is a helper method to define mock.On call +// - disabled bool +func (_e *Builder_Expecter) WithDisableAutoPageBreak(disabled interface{}) *Builder_WithDisableAutoPageBreak_Call { + return &Builder_WithDisableAutoPageBreak_Call{Call: _e.mock.On("WithDisableAutoPageBreak", disabled)} +} + +func (_c *Builder_WithDisableAutoPageBreak_Call) Run(run func(disabled bool)) *Builder_WithDisableAutoPageBreak_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *Builder_WithDisableAutoPageBreak_Call) Return(_a0 config.Builder) *Builder_WithDisableAutoPageBreak_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithDisableAutoPageBreak_Call) RunAndReturn(run func(bool) config.Builder) *Builder_WithDisableAutoPageBreak_Call { + _c.Call.Return(run) + return _c +} + +// WithKeywords provides a mock function with given fields: keywordsStr, isUTF8 +func (_m *Builder) WithKeywords(keywordsStr string, isUTF8 bool) config.Builder { + ret := _m.Called(keywordsStr, isUTF8) + + if len(ret) == 0 { + panic("no return value specified for WithKeywords") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(string, bool) config.Builder); ok { + r0 = rf(keywordsStr, isUTF8) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithKeywords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithKeywords' +type Builder_WithKeywords_Call struct { + *mock.Call +} + +// WithKeywords is a helper method to define mock.On call +// - keywordsStr string +// - isUTF8 bool +func (_e *Builder_Expecter) WithKeywords(keywordsStr interface{}, isUTF8 interface{}) *Builder_WithKeywords_Call { + return &Builder_WithKeywords_Call{Call: _e.mock.On("WithKeywords", keywordsStr, isUTF8)} +} + +func (_c *Builder_WithKeywords_Call) Run(run func(keywordsStr string, isUTF8 bool)) *Builder_WithKeywords_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Builder_WithKeywords_Call) Return(_a0 config.Builder) *Builder_WithKeywords_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithKeywords_Call) RunAndReturn(run func(string, bool) config.Builder) *Builder_WithKeywords_Call { + _c.Call.Return(run) + return _c +} + +// WithLeftMargin provides a mock function with given fields: left +func (_m *Builder) WithLeftMargin(left float64) config.Builder { + ret := _m.Called(left) + + if len(ret) == 0 { + panic("no return value specified for WithLeftMargin") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(float64) config.Builder); ok { + r0 = rf(left) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithLeftMargin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithLeftMargin' +type Builder_WithLeftMargin_Call struct { + *mock.Call +} + +// WithLeftMargin is a helper method to define mock.On call +// - left float64 +func (_e *Builder_Expecter) WithLeftMargin(left interface{}) *Builder_WithLeftMargin_Call { + return &Builder_WithLeftMargin_Call{Call: _e.mock.On("WithLeftMargin", left)} +} + +func (_c *Builder_WithLeftMargin_Call) Run(run func(left float64)) *Builder_WithLeftMargin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(float64)) + }) + return _c +} + +func (_c *Builder_WithLeftMargin_Call) Return(_a0 config.Builder) *Builder_WithLeftMargin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithLeftMargin_Call) RunAndReturn(run func(float64) config.Builder) *Builder_WithLeftMargin_Call { + _c.Call.Return(run) + return _c +} + +// WithMaxGridSize provides a mock function with given fields: maxGridSize +func (_m *Builder) WithMaxGridSize(maxGridSize int) config.Builder { + ret := _m.Called(maxGridSize) + + if len(ret) == 0 { + panic("no return value specified for WithMaxGridSize") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(int) config.Builder); ok { + r0 = rf(maxGridSize) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithMaxGridSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithMaxGridSize' +type Builder_WithMaxGridSize_Call struct { + *mock.Call +} + +// WithMaxGridSize is a helper method to define mock.On call +// - maxGridSize int +func (_e *Builder_Expecter) WithMaxGridSize(maxGridSize interface{}) *Builder_WithMaxGridSize_Call { + return &Builder_WithMaxGridSize_Call{Call: _e.mock.On("WithMaxGridSize", maxGridSize)} +} + +func (_c *Builder_WithMaxGridSize_Call) Run(run func(maxGridSize int)) *Builder_WithMaxGridSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *Builder_WithMaxGridSize_Call) Return(_a0 config.Builder) *Builder_WithMaxGridSize_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithMaxGridSize_Call) RunAndReturn(run func(int) config.Builder) *Builder_WithMaxGridSize_Call { + _c.Call.Return(run) + return _c +} + +// WithOrientation provides a mock function with given fields: _a0 +func (_m *Builder) WithOrientation(_a0 orientation.Type) config.Builder { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for WithOrientation") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(orientation.Type) config.Builder); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithOrientation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithOrientation' +type Builder_WithOrientation_Call struct { + *mock.Call +} + +// WithOrientation is a helper method to define mock.On call +// - _a0 orientation.Type +func (_e *Builder_Expecter) WithOrientation(_a0 interface{}) *Builder_WithOrientation_Call { + return &Builder_WithOrientation_Call{Call: _e.mock.On("WithOrientation", _a0)} +} + +func (_c *Builder_WithOrientation_Call) Run(run func(_a0 orientation.Type)) *Builder_WithOrientation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(orientation.Type)) + }) + return _c +} + +func (_c *Builder_WithOrientation_Call) Return(_a0 config.Builder) *Builder_WithOrientation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithOrientation_Call) RunAndReturn(run func(orientation.Type) config.Builder) *Builder_WithOrientation_Call { + _c.Call.Return(run) + return _c +} + +// WithPageNumber provides a mock function with given fields: pageNumber +func (_m *Builder) WithPageNumber(pageNumber ...props.PageNumber) config.Builder { + _va := make([]interface{}, len(pageNumber)) + for _i := range pageNumber { + _va[_i] = pageNumber[_i] + } + var _ca []interface{} + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for WithPageNumber") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(...props.PageNumber) config.Builder); ok { + r0 = rf(pageNumber...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithPageNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithPageNumber' +type Builder_WithPageNumber_Call struct { + *mock.Call +} + +// WithPageNumber is a helper method to define mock.On call +// - pageNumber ...props.PageNumber +func (_e *Builder_Expecter) WithPageNumber(pageNumber ...interface{}) *Builder_WithPageNumber_Call { + return &Builder_WithPageNumber_Call{Call: _e.mock.On("WithPageNumber", + append([]interface{}{}, pageNumber...)...)} +} + +func (_c *Builder_WithPageNumber_Call) Run(run func(pageNumber ...props.PageNumber)) *Builder_WithPageNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]props.PageNumber, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(props.PageNumber) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *Builder_WithPageNumber_Call) Return(_a0 config.Builder) *Builder_WithPageNumber_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithPageNumber_Call) RunAndReturn(run func(...props.PageNumber) config.Builder) *Builder_WithPageNumber_Call { + _c.Call.Return(run) + return _c +} + +// WithPageSize provides a mock function with given fields: size +func (_m *Builder) WithPageSize(size pagesize.Type) config.Builder { + ret := _m.Called(size) + + if len(ret) == 0 { + panic("no return value specified for WithPageSize") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(pagesize.Type) config.Builder); ok { + r0 = rf(size) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithPageSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithPageSize' +type Builder_WithPageSize_Call struct { + *mock.Call +} + +// WithPageSize is a helper method to define mock.On call +// - size pagesize.Type +func (_e *Builder_Expecter) WithPageSize(size interface{}) *Builder_WithPageSize_Call { + return &Builder_WithPageSize_Call{Call: _e.mock.On("WithPageSize", size)} +} + +func (_c *Builder_WithPageSize_Call) Run(run func(size pagesize.Type)) *Builder_WithPageSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(pagesize.Type)) + }) + return _c +} + +func (_c *Builder_WithPageSize_Call) Return(_a0 config.Builder) *Builder_WithPageSize_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithPageSize_Call) RunAndReturn(run func(pagesize.Type) config.Builder) *Builder_WithPageSize_Call { + _c.Call.Return(run) + return _c +} + +// WithProtection provides a mock function with given fields: protectionType, userPassword, ownerPassword +func (_m *Builder) WithProtection(protectionType protection.Type, userPassword string, ownerPassword string) config.Builder { + ret := _m.Called(protectionType, userPassword, ownerPassword) + + if len(ret) == 0 { + panic("no return value specified for WithProtection") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(protection.Type, string, string) config.Builder); ok { + r0 = rf(protectionType, userPassword, ownerPassword) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithProtection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithProtection' +type Builder_WithProtection_Call struct { + *mock.Call +} + +// WithProtection is a helper method to define mock.On call +// - protectionType protection.Type +// - userPassword string +// - ownerPassword string +func (_e *Builder_Expecter) WithProtection(protectionType interface{}, userPassword interface{}, ownerPassword interface{}) *Builder_WithProtection_Call { + return &Builder_WithProtection_Call{Call: _e.mock.On("WithProtection", protectionType, userPassword, ownerPassword)} +} + +func (_c *Builder_WithProtection_Call) Run(run func(protectionType protection.Type, userPassword string, ownerPassword string)) *Builder_WithProtection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(protection.Type), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *Builder_WithProtection_Call) Return(_a0 config.Builder) *Builder_WithProtection_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithProtection_Call) RunAndReturn(run func(protection.Type, string, string) config.Builder) *Builder_WithProtection_Call { + _c.Call.Return(run) + return _c +} + +// WithRightMargin provides a mock function with given fields: right +func (_m *Builder) WithRightMargin(right float64) config.Builder { + ret := _m.Called(right) + + if len(ret) == 0 { + panic("no return value specified for WithRightMargin") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(float64) config.Builder); ok { + r0 = rf(right) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithRightMargin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithRightMargin' +type Builder_WithRightMargin_Call struct { + *mock.Call +} + +// WithRightMargin is a helper method to define mock.On call +// - right float64 +func (_e *Builder_Expecter) WithRightMargin(right interface{}) *Builder_WithRightMargin_Call { + return &Builder_WithRightMargin_Call{Call: _e.mock.On("WithRightMargin", right)} +} + +func (_c *Builder_WithRightMargin_Call) Run(run func(right float64)) *Builder_WithRightMargin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(float64)) + }) + return _c +} + +func (_c *Builder_WithRightMargin_Call) Return(_a0 config.Builder) *Builder_WithRightMargin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithRightMargin_Call) RunAndReturn(run func(float64) config.Builder) *Builder_WithRightMargin_Call { + _c.Call.Return(run) + return _c +} + +// WithSequentialLowMemoryMode provides a mock function with given fields: chunkWorkers +func (_m *Builder) WithSequentialLowMemoryMode(chunkWorkers int) config.Builder { + ret := _m.Called(chunkWorkers) + + if len(ret) == 0 { + panic("no return value specified for WithSequentialLowMemoryMode") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(int) config.Builder); ok { + r0 = rf(chunkWorkers) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithSequentialLowMemoryMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithSequentialLowMemoryMode' +type Builder_WithSequentialLowMemoryMode_Call struct { + *mock.Call +} + +// WithSequentialLowMemoryMode is a helper method to define mock.On call +// - chunkWorkers int +func (_e *Builder_Expecter) WithSequentialLowMemoryMode(chunkWorkers interface{}) *Builder_WithSequentialLowMemoryMode_Call { + return &Builder_WithSequentialLowMemoryMode_Call{Call: _e.mock.On("WithSequentialLowMemoryMode", chunkWorkers)} +} + +func (_c *Builder_WithSequentialLowMemoryMode_Call) Run(run func(chunkWorkers int)) *Builder_WithSequentialLowMemoryMode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *Builder_WithSequentialLowMemoryMode_Call) Return(_a0 config.Builder) *Builder_WithSequentialLowMemoryMode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithSequentialLowMemoryMode_Call) RunAndReturn(run func(int) config.Builder) *Builder_WithSequentialLowMemoryMode_Call { + _c.Call.Return(run) + return _c +} + +// WithSequentialMode provides a mock function with no fields +func (_m *Builder) WithSequentialMode() config.Builder { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for WithSequentialMode") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func() config.Builder); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithSequentialMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithSequentialMode' +type Builder_WithSequentialMode_Call struct { + *mock.Call +} + +// WithSequentialMode is a helper method to define mock.On call +func (_e *Builder_Expecter) WithSequentialMode() *Builder_WithSequentialMode_Call { + return &Builder_WithSequentialMode_Call{Call: _e.mock.On("WithSequentialMode")} +} + +func (_c *Builder_WithSequentialMode_Call) Run(run func()) *Builder_WithSequentialMode_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Builder_WithSequentialMode_Call) Return(_a0 config.Builder) *Builder_WithSequentialMode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithSequentialMode_Call) RunAndReturn(run func() config.Builder) *Builder_WithSequentialMode_Call { + _c.Call.Return(run) + return _c +} + +// WithSubject provides a mock function with given fields: subject, isUTF8 +func (_m *Builder) WithSubject(subject string, isUTF8 bool) config.Builder { + ret := _m.Called(subject, isUTF8) + + if len(ret) == 0 { + panic("no return value specified for WithSubject") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(string, bool) config.Builder); ok { + r0 = rf(subject, isUTF8) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithSubject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithSubject' +type Builder_WithSubject_Call struct { + *mock.Call +} + +// WithSubject is a helper method to define mock.On call +// - subject string +// - isUTF8 bool +func (_e *Builder_Expecter) WithSubject(subject interface{}, isUTF8 interface{}) *Builder_WithSubject_Call { + return &Builder_WithSubject_Call{Call: _e.mock.On("WithSubject", subject, isUTF8)} +} + +func (_c *Builder_WithSubject_Call) Run(run func(subject string, isUTF8 bool)) *Builder_WithSubject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Builder_WithSubject_Call) Return(_a0 config.Builder) *Builder_WithSubject_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithSubject_Call) RunAndReturn(run func(string, bool) config.Builder) *Builder_WithSubject_Call { + _c.Call.Return(run) + return _c +} + +// WithTitle provides a mock function with given fields: title, isUTF8 +func (_m *Builder) WithTitle(title string, isUTF8 bool) config.Builder { + ret := _m.Called(title, isUTF8) + + if len(ret) == 0 { + panic("no return value specified for WithTitle") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(string, bool) config.Builder); ok { + r0 = rf(title, isUTF8) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithTitle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTitle' +type Builder_WithTitle_Call struct { + *mock.Call +} + +// WithTitle is a helper method to define mock.On call +// - title string +// - isUTF8 bool +func (_e *Builder_Expecter) WithTitle(title interface{}, isUTF8 interface{}) *Builder_WithTitle_Call { + return &Builder_WithTitle_Call{Call: _e.mock.On("WithTitle", title, isUTF8)} +} + +func (_c *Builder_WithTitle_Call) Run(run func(title string, isUTF8 bool)) *Builder_WithTitle_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Builder_WithTitle_Call) Return(_a0 config.Builder) *Builder_WithTitle_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Builder_WithTitle_Call) RunAndReturn(run func(string, bool) config.Builder) *Builder_WithTitle_Call { + _c.Call.Return(run) + return _c +} + +// WithTopMargin provides a mock function with given fields: top +func (_m *Builder) WithTopMargin(top float64) config.Builder { + ret := _m.Called(top) + + if len(ret) == 0 { + panic("no return value specified for WithTopMargin") + } + + var r0 config.Builder + if rf, ok := ret.Get(0).(func(float64) config.Builder); ok { + r0 = rf(top) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.Builder) + } + } + + return r0 +} + +// Builder_WithTopMargin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTopMargin' +type Builder_WithTopMargin_Call struct { + *mock.Call +} + +// WithTopMargin is a helper method to define mock.On call +// - top float64 +func (_e *Builder_Expecter) WithTopMargin(top interface{}) *Builder_WithTopMargin_Call { + return &Builder_WithTopMargin_Call{Call: _e.mock.On("WithTopMargin", top)} } -func (_c *Builder_Build_Call) Run(run func(cfg *entity.Config, _a1 cache.Cache)) *Builder_Build_Call { +func (_c *Builder_WithTopMargin_Call) Run(run func(top float64)) *Builder_WithTopMargin_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*entity.Config), args[1].(cache.Cache)) + run(args[0].(float64)) }) return _c } -func (_c *Builder_Build_Call) Return(_a0 *gofpdf.Dependencies) *Builder_Build_Call { +func (_c *Builder_WithTopMargin_Call) Return(_a0 config.Builder) *Builder_WithTopMargin_Call { _c.Call.Return(_a0) return _c } -func (_c *Builder_Build_Call) RunAndReturn(run func(*entity.Config, cache.Cache) *gofpdf.Dependencies) *Builder_Build_Call { +func (_c *Builder_WithTopMargin_Call) RunAndReturn(run func(float64) config.Builder) *Builder_WithTopMargin_Call { _c.Call.Return(run) return _c } diff --git a/mocks/Cache.go b/mocks/Cache.go index 25ebce39..677313f9 100644 --- a/mocks/Cache.go +++ b/mocks/Cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -52,7 +52,7 @@ func (_c *Cache_AddImage_Call) Return() *Cache_AddImage_Call { } func (_c *Cache_AddImage_Call) RunAndReturn(run func(string, *entity.Image)) *Cache_AddImage_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/CellWriter.go b/mocks/CellWriter.go index 7d47e029..04dd662d 100644 --- a/mocks/CellWriter.go +++ b/mocks/CellWriter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -56,11 +56,11 @@ func (_c *CellWriter_Apply_Call) Return() *CellWriter_Apply_Call { } func (_c *CellWriter_Apply_Call) RunAndReturn(run func(float64, float64, *entity.Config, *props.Cell)) *CellWriter_Apply_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// GetName provides a mock function with given fields: +// GetName provides a mock function with no fields func (_m *CellWriter) GetName() string { ret := _m.Called() @@ -105,7 +105,7 @@ func (_c *CellWriter_GetName_Call) RunAndReturn(run func() string) *CellWriter_G return _c } -// GetNext provides a mock function with given fields: +// GetNext provides a mock function with no fields func (_m *CellWriter) GetNext() cellwriter.CellWriter { ret := _m.Called() @@ -181,7 +181,7 @@ func (_c *CellWriter_SetNext_Call) Return() *CellWriter_SetNext_Call { } func (_c *CellWriter_SetNext_Call) RunAndReturn(run func(cellwriter.CellWriter)) *CellWriter_SetNext_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Code.go b/mocks/Code.go index 747d5bc4..2ff7738a 100644 --- a/mocks/Code.go +++ b/mocks/Code.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks diff --git a/mocks/Col.go b/mocks/Col.go index dc4a7276..2acbd001 100644 --- a/mocks/Col.go +++ b/mocks/Col.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -134,7 +134,7 @@ func (_c *Col_GetHeight_Call) RunAndReturn(run func(core.Provider, *entity.Cell) return _c } -// GetSize provides a mock function with given fields: +// GetSize provides a mock function with no fields func (_m *Col) GetSize() int { ret := _m.Called() @@ -179,7 +179,7 @@ func (_c *Col_GetSize_Call) RunAndReturn(run func() int) *Col_GetSize_Call { return _c } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Col) GetStructure() *node.Node[core.Structure] { ret := _m.Called() @@ -257,7 +257,7 @@ func (_c *Col_Render_Call) Return() *Col_Render_Call { } func (_c *Col_Render_Call) RunAndReturn(run func(core.Provider, entity.Cell, bool)) *Col_Render_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -290,7 +290,7 @@ func (_c *Col_SetConfig_Call) Return() *Col_SetConfig_Call { } func (_c *Col_SetConfig_Call) RunAndReturn(run func(*entity.Config)) *Col_SetConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Component.go b/mocks/Component.go index 5b096b9a..6d63daea 100644 --- a/mocks/Component.go +++ b/mocks/Component.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -71,7 +71,7 @@ func (_c *Component_GetHeight_Call) RunAndReturn(run func(core.Provider, *entity return _c } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Component) GetStructure() *node.Node[core.Structure] { ret := _m.Called() @@ -148,7 +148,7 @@ func (_c *Component_Render_Call) Return() *Component_Render_Call { } func (_c *Component_Render_Call) RunAndReturn(run func(core.Provider, *entity.Cell)) *Component_Render_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -181,7 +181,7 @@ func (_c *Component_SetConfig_Call) Return() *Component_SetConfig_Call { } func (_c *Component_SetConfig_Call) RunAndReturn(run func(*entity.Config)) *Component_SetConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Document.go b/mocks/Document.go index c1a675cc..c72e0170 100644 --- a/mocks/Document.go +++ b/mocks/Document.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -20,7 +20,7 @@ func (_m *Document) EXPECT() *Document_Expecter { return &Document_Expecter{mock: &_m.Mock} } -// GetBase64 provides a mock function with given fields: +// GetBase64 provides a mock function with no fields func (_m *Document) GetBase64() string { ret := _m.Called() @@ -65,7 +65,7 @@ func (_c *Document_GetBase64_Call) RunAndReturn(run func() string) *Document_Get return _c } -// GetBytes provides a mock function with given fields: +// GetBytes provides a mock function with no fields func (_m *Document) GetBytes() []byte { ret := _m.Called() @@ -112,7 +112,7 @@ func (_c *Document_GetBytes_Call) RunAndReturn(run func() []byte) *Document_GetB return _c } -// GetReport provides a mock function with given fields: +// GetReport provides a mock function with no fields func (_m *Document) GetReport() *metrics.Report { ret := _m.Called() diff --git a/mocks/Font.go b/mocks/Font.go index 3c394374..bc293983 100644 --- a/mocks/Font.go +++ b/mocks/Font.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -22,7 +22,7 @@ func (_m *Font) EXPECT() *Font_Expecter { return &Font_Expecter{mock: &_m.Mock} } -// GetColor provides a mock function with given fields: +// GetColor provides a mock function with no fields func (_m *Font) GetColor() *props.Color { ret := _m.Called() @@ -69,7 +69,7 @@ func (_c *Font_GetColor_Call) RunAndReturn(run func() *props.Color) *Font_GetCol return _c } -// GetFamily provides a mock function with given fields: +// GetFamily provides a mock function with no fields func (_m *Font) GetFamily() string { ret := _m.Called() @@ -114,7 +114,7 @@ func (_c *Font_GetFamily_Call) RunAndReturn(run func() string) *Font_GetFamily_C return _c } -// GetFont provides a mock function with given fields: +// GetFont provides a mock function with no fields func (_m *Font) GetFont() (string, fontstyle.Type, float64) { ret := _m.Called() @@ -224,7 +224,7 @@ func (_c *Font_GetHeight_Call) RunAndReturn(run func(string, fontstyle.Type, flo return _c } -// GetSize provides a mock function with given fields: +// GetSize provides a mock function with no fields func (_m *Font) GetSize() float64 { ret := _m.Called() @@ -269,7 +269,7 @@ func (_c *Font_GetSize_Call) RunAndReturn(run func() float64) *Font_GetSize_Call return _c } -// GetStyle provides a mock function with given fields: +// GetStyle provides a mock function with no fields func (_m *Font) GetStyle() fontstyle.Type { ret := _m.Called() @@ -343,7 +343,7 @@ func (_c *Font_SetColor_Call) Return() *Font_SetColor_Call { } func (_c *Font_SetColor_Call) RunAndReturn(run func(*props.Color)) *Font_SetColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -376,7 +376,7 @@ func (_c *Font_SetFamily_Call) Return() *Font_SetFamily_Call { } func (_c *Font_SetFamily_Call) RunAndReturn(run func(string)) *Font_SetFamily_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -411,7 +411,7 @@ func (_c *Font_SetFont_Call) Return() *Font_SetFont_Call { } func (_c *Font_SetFont_Call) RunAndReturn(run func(string, fontstyle.Type, float64)) *Font_SetFont_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -444,7 +444,7 @@ func (_c *Font_SetSize_Call) Return() *Font_SetSize_Call { } func (_c *Font_SetSize_Call) RunAndReturn(run func(float64)) *Font_SetSize_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -477,7 +477,7 @@ func (_c *Font_SetStyle_Call) Return() *Font_SetStyle_Call { } func (_c *Font_SetStyle_Call) RunAndReturn(run func(fontstyle.Type)) *Font_SetStyle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Fpdf.go b/mocks/Fpdf.go index 2b89935f..145a9295 100644 --- a/mocks/Fpdf.go +++ b/mocks/Fpdf.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -56,7 +56,7 @@ func (_c *Fpdf_AddFont_Call) Return() *Fpdf_AddFont_Call { } func (_c *Fpdf_AddFont_Call) RunAndReturn(run func(string, string, string)) *Fpdf_AddFont_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -92,7 +92,7 @@ func (_c *Fpdf_AddFontFromBytes_Call) Return() *Fpdf_AddFontFromBytes_Call { } func (_c *Fpdf_AddFontFromBytes_Call) RunAndReturn(run func(string, string, []byte, []byte)) *Fpdf_AddFontFromBytes_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -127,7 +127,7 @@ func (_c *Fpdf_AddFontFromReader_Call) Return() *Fpdf_AddFontFromReader_Call { } func (_c *Fpdf_AddFontFromReader_Call) RunAndReturn(run func(string, string, io.Reader)) *Fpdf_AddFontFromReader_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -178,7 +178,7 @@ func (_c *Fpdf_AddLayer_Call) RunAndReturn(run func(string, bool) int) *Fpdf_Add return _c } -// AddLink provides a mock function with given fields: +// AddLink provides a mock function with no fields func (_m *Fpdf) AddLink() int { ret := _m.Called() @@ -223,7 +223,7 @@ func (_c *Fpdf_AddLink_Call) RunAndReturn(run func() int) *Fpdf_AddLink_Call { return _c } -// AddPage provides a mock function with given fields: +// AddPage provides a mock function with no fields func (_m *Fpdf) AddPage() { _m.Called() } @@ -251,7 +251,7 @@ func (_c *Fpdf_AddPage_Call) Return() *Fpdf_AddPage_Call { } func (_c *Fpdf_AddPage_Call) RunAndReturn(run func()) *Fpdf_AddPage_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -285,7 +285,7 @@ func (_c *Fpdf_AddPageFormat_Call) Return() *Fpdf_AddPageFormat_Call { } func (_c *Fpdf_AddPageFormat_Call) RunAndReturn(run func(string, gofpdf.SizeType)) *Fpdf_AddPageFormat_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -322,7 +322,7 @@ func (_c *Fpdf_AddSpotColor_Call) Return() *Fpdf_AddSpotColor_Call { } func (_c *Fpdf_AddSpotColor_Call) RunAndReturn(run func(string, byte, byte, byte, byte)) *Fpdf_AddSpotColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -357,7 +357,7 @@ func (_c *Fpdf_AddUTF8FontFromBytes_Call) Return() *Fpdf_AddUTF8FontFromBytes_Ca } func (_c *Fpdf_AddUTF8FontFromBytes_Call) RunAndReturn(run func(string, string, []byte)) *Fpdf_AddUTF8FontFromBytes_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -390,7 +390,7 @@ func (_c *Fpdf_AliasNbPages_Call) Return() *Fpdf_AliasNbPages_Call { } func (_c *Fpdf_AliasNbPages_Call) RunAndReturn(run func(string)) *Fpdf_AliasNbPages_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -430,7 +430,7 @@ func (_c *Fpdf_Arc_Call) Return() *Fpdf_Arc_Call { } func (_c *Fpdf_Arc_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64, float64, string)) *Fpdf_Arc_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -469,7 +469,7 @@ func (_c *Fpdf_ArcTo_Call) Return() *Fpdf_ArcTo_Call { } func (_c *Fpdf_ArcTo_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64, float64)) *Fpdf_ArcTo_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -502,7 +502,7 @@ func (_c *Fpdf_BeginLayer_Call) Return() *Fpdf_BeginLayer_Call { } func (_c *Fpdf_BeginLayer_Call) RunAndReturn(run func(int)) *Fpdf_BeginLayer_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -536,7 +536,7 @@ func (_c *Fpdf_Beziergon_Call) Return() *Fpdf_Beziergon_Call { } func (_c *Fpdf_Beziergon_Call) RunAndReturn(run func([]gofpdf.PointType, string)) *Fpdf_Beziergon_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -571,7 +571,7 @@ func (_c *Fpdf_Bookmark_Call) Return() *Fpdf_Bookmark_Call { } func (_c *Fpdf_Bookmark_Call) RunAndReturn(run func(string, int, float64)) *Fpdf_Bookmark_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -606,7 +606,7 @@ func (_c *Fpdf_Cell_Call) Return() *Fpdf_Cell_Call { } func (_c *Fpdf_Cell_Call) RunAndReturn(run func(float64, float64, string)) *Fpdf_Cell_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -647,7 +647,7 @@ func (_c *Fpdf_CellFormat_Call) Return() *Fpdf_CellFormat_Call { } func (_c *Fpdf_CellFormat_Call) RunAndReturn(run func(float64, float64, string, string, int, string, bool, int, string)) *Fpdf_CellFormat_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -693,7 +693,7 @@ func (_c *Fpdf_Cellf_Call) Return() *Fpdf_Cellf_Call { } func (_c *Fpdf_Cellf_Call) RunAndReturn(run func(float64, float64, string, ...interface{})) *Fpdf_Cellf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -729,11 +729,11 @@ func (_c *Fpdf_Circle_Call) Return() *Fpdf_Circle_Call { } func (_c *Fpdf_Circle_Call) RunAndReturn(run func(float64, float64, float64, string)) *Fpdf_Circle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// ClearError provides a mock function with given fields: +// ClearError provides a mock function with no fields func (_m *Fpdf) ClearError() { _m.Called() } @@ -761,7 +761,7 @@ func (_c *Fpdf_ClearError_Call) Return() *Fpdf_ClearError_Call { } func (_c *Fpdf_ClearError_Call) RunAndReturn(run func()) *Fpdf_ClearError_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -797,7 +797,7 @@ func (_c *Fpdf_ClipCircle_Call) Return() *Fpdf_ClipCircle_Call { } func (_c *Fpdf_ClipCircle_Call) RunAndReturn(run func(float64, float64, float64, bool)) *Fpdf_ClipCircle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -834,11 +834,11 @@ func (_c *Fpdf_ClipEllipse_Call) Return() *Fpdf_ClipEllipse_Call { } func (_c *Fpdf_ClipEllipse_Call) RunAndReturn(run func(float64, float64, float64, float64, bool)) *Fpdf_ClipEllipse_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// ClipEnd provides a mock function with given fields: +// ClipEnd provides a mock function with no fields func (_m *Fpdf) ClipEnd() { _m.Called() } @@ -866,7 +866,7 @@ func (_c *Fpdf_ClipEnd_Call) Return() *Fpdf_ClipEnd_Call { } func (_c *Fpdf_ClipEnd_Call) RunAndReturn(run func()) *Fpdf_ClipEnd_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -900,7 +900,7 @@ func (_c *Fpdf_ClipPolygon_Call) Return() *Fpdf_ClipPolygon_Call { } func (_c *Fpdf_ClipPolygon_Call) RunAndReturn(run func([]gofpdf.PointType, bool)) *Fpdf_ClipPolygon_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -937,7 +937,7 @@ func (_c *Fpdf_ClipRect_Call) Return() *Fpdf_ClipRect_Call { } func (_c *Fpdf_ClipRect_Call) RunAndReturn(run func(float64, float64, float64, float64, bool)) *Fpdf_ClipRect_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -975,7 +975,7 @@ func (_c *Fpdf_ClipRoundedRect_Call) Return() *Fpdf_ClipRoundedRect_Call { } func (_c *Fpdf_ClipRoundedRect_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, bool)) *Fpdf_ClipRoundedRect_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1011,11 +1011,11 @@ func (_c *Fpdf_ClipText_Call) Return() *Fpdf_ClipText_Call { } func (_c *Fpdf_ClipText_Call) RunAndReturn(run func(float64, float64, string, bool)) *Fpdf_ClipText_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *Fpdf) Close() { _m.Called() } @@ -1043,11 +1043,11 @@ func (_c *Fpdf_Close_Call) Return() *Fpdf_Close_Call { } func (_c *Fpdf_Close_Call) RunAndReturn(run func()) *Fpdf_Close_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// ClosePath provides a mock function with given fields: +// ClosePath provides a mock function with no fields func (_m *Fpdf) ClosePath() { _m.Called() } @@ -1075,7 +1075,7 @@ func (_c *Fpdf_ClosePath_Call) Return() *Fpdf_ClosePath_Call { } func (_c *Fpdf_ClosePath_Call) RunAndReturn(run func()) *Fpdf_ClosePath_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1212,7 +1212,7 @@ func (_c *Fpdf_Curve_Call) Return() *Fpdf_Curve_Call { } func (_c *Fpdf_Curve_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64, string)) *Fpdf_Curve_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1253,7 +1253,7 @@ func (_c *Fpdf_CurveBezierCubic_Call) Return() *Fpdf_CurveBezierCubic_Call { } func (_c *Fpdf_CurveBezierCubic_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64, float64, float64, string)) *Fpdf_CurveBezierCubic_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1291,7 +1291,7 @@ func (_c *Fpdf_CurveBezierCubicTo_Call) Return() *Fpdf_CurveBezierCubicTo_Call { } func (_c *Fpdf_CurveBezierCubicTo_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64)) *Fpdf_CurveBezierCubicTo_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1332,7 +1332,7 @@ func (_c *Fpdf_CurveCubic_Call) Return() *Fpdf_CurveCubic_Call { } func (_c *Fpdf_CurveCubic_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, float64, float64, float64, string)) *Fpdf_CurveCubic_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1368,7 +1368,7 @@ func (_c *Fpdf_CurveTo_Call) Return() *Fpdf_CurveTo_Call { } func (_c *Fpdf_CurveTo_Call) RunAndReturn(run func(float64, float64, float64, float64)) *Fpdf_CurveTo_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1401,7 +1401,7 @@ func (_c *Fpdf_DrawPath_Call) Return() *Fpdf_DrawPath_Call { } func (_c *Fpdf_DrawPath_Call) RunAndReturn(run func(string)) *Fpdf_DrawPath_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -1439,11 +1439,11 @@ func (_c *Fpdf_Ellipse_Call) Return() *Fpdf_Ellipse_Call { } func (_c *Fpdf_Ellipse_Call) RunAndReturn(run func(float64, float64, float64, float64, float64, string)) *Fpdf_Ellipse_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// EndLayer provides a mock function with given fields: +// EndLayer provides a mock function with no fields func (_m *Fpdf) EndLayer() { _m.Called() } @@ -1471,11 +1471,11 @@ func (_c *Fpdf_EndLayer_Call) Return() *Fpdf_EndLayer_Call { } func (_c *Fpdf_EndLayer_Call) RunAndReturn(run func()) *Fpdf_EndLayer_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// Err provides a mock function with given fields: +// Err provides a mock function with no fields func (_m *Fpdf) Err() bool { ret := _m.Called() @@ -1520,7 +1520,7 @@ func (_c *Fpdf_Err_Call) RunAndReturn(run func() bool) *Fpdf_Err_Call { return _c } -// Error provides a mock function with given fields: +// Error provides a mock function with no fields func (_m *Fpdf) Error() error { ret := _m.Called() @@ -1565,7 +1565,7 @@ func (_c *Fpdf_Error_Call) RunAndReturn(run func() error) *Fpdf_Error_Call { return _c } -// GetAlpha provides a mock function with given fields: +// GetAlpha provides a mock function with no fields func (_m *Fpdf) GetAlpha() (float64, string) { ret := _m.Called() @@ -1620,7 +1620,7 @@ func (_c *Fpdf_GetAlpha_Call) RunAndReturn(run func() (float64, string)) *Fpdf_G return _c } -// GetAutoPageBreak provides a mock function with given fields: +// GetAutoPageBreak provides a mock function with no fields func (_m *Fpdf) GetAutoPageBreak() (bool, float64) { ret := _m.Called() @@ -1675,7 +1675,7 @@ func (_c *Fpdf_GetAutoPageBreak_Call) RunAndReturn(run func() (bool, float64)) * return _c } -// GetCellMargin provides a mock function with given fields: +// GetCellMargin provides a mock function with no fields func (_m *Fpdf) GetCellMargin() float64 { ret := _m.Called() @@ -1720,7 +1720,7 @@ func (_c *Fpdf_GetCellMargin_Call) RunAndReturn(run func() float64) *Fpdf_GetCel return _c } -// GetConversionRatio provides a mock function with given fields: +// GetConversionRatio provides a mock function with no fields func (_m *Fpdf) GetConversionRatio() float64 { ret := _m.Called() @@ -1765,7 +1765,7 @@ func (_c *Fpdf_GetConversionRatio_Call) RunAndReturn(run func() float64) *Fpdf_G return _c } -// GetDrawColor provides a mock function with given fields: +// GetDrawColor provides a mock function with no fields func (_m *Fpdf) GetDrawColor() (int, int, int) { ret := _m.Called() @@ -1827,7 +1827,7 @@ func (_c *Fpdf_GetDrawColor_Call) RunAndReturn(run func() (int, int, int)) *Fpdf return _c } -// GetDrawSpotColor provides a mock function with given fields: +// GetDrawSpotColor provides a mock function with no fields func (_m *Fpdf) GetDrawSpotColor() (string, byte, byte, byte, byte) { ret := _m.Called() @@ -1903,7 +1903,7 @@ func (_c *Fpdf_GetDrawSpotColor_Call) RunAndReturn(run func() (string, byte, byt return _c } -// GetFillColor provides a mock function with given fields: +// GetFillColor provides a mock function with no fields func (_m *Fpdf) GetFillColor() (int, int, int) { ret := _m.Called() @@ -1965,7 +1965,7 @@ func (_c *Fpdf_GetFillColor_Call) RunAndReturn(run func() (int, int, int)) *Fpdf return _c } -// GetFillSpotColor provides a mock function with given fields: +// GetFillSpotColor provides a mock function with no fields func (_m *Fpdf) GetFillSpotColor() (string, byte, byte, byte, byte) { ret := _m.Called() @@ -2088,7 +2088,7 @@ func (_c *Fpdf_GetFontDesc_Call) RunAndReturn(run func(string, string) gofpdf.Fo return _c } -// GetFontSize provides a mock function with given fields: +// GetFontSize provides a mock function with no fields func (_m *Fpdf) GetFontSize() (float64, float64) { ret := _m.Called() @@ -2191,7 +2191,7 @@ func (_c *Fpdf_GetImageInfo_Call) RunAndReturn(run func(string) *gofpdf.ImageInf return _c } -// GetLineWidth provides a mock function with given fields: +// GetLineWidth provides a mock function with no fields func (_m *Fpdf) GetLineWidth() float64 { ret := _m.Called() @@ -2236,7 +2236,7 @@ func (_c *Fpdf_GetLineWidth_Call) RunAndReturn(run func() float64) *Fpdf_GetLine return _c } -// GetMargins provides a mock function with given fields: +// GetMargins provides a mock function with no fields func (_m *Fpdf) GetMargins() (float64, float64, float64, float64) { ret := _m.Called() @@ -2305,7 +2305,7 @@ func (_c *Fpdf_GetMargins_Call) RunAndReturn(run func() (float64, float64, float return _c } -// GetPageSize provides a mock function with given fields: +// GetPageSize provides a mock function with no fields func (_m *Fpdf) GetPageSize() (float64, float64) { ret := _m.Called() @@ -2452,7 +2452,7 @@ func (_c *Fpdf_GetStringWidth_Call) RunAndReturn(run func(string) float64) *Fpdf return _c } -// GetTextColor provides a mock function with given fields: +// GetTextColor provides a mock function with no fields func (_m *Fpdf) GetTextColor() (int, int, int) { ret := _m.Called() @@ -2514,7 +2514,7 @@ func (_c *Fpdf_GetTextColor_Call) RunAndReturn(run func() (int, int, int)) *Fpdf return _c } -// GetTextSpotColor provides a mock function with given fields: +// GetTextSpotColor provides a mock function with no fields func (_m *Fpdf) GetTextSpotColor() (string, byte, byte, byte, byte) { ret := _m.Called() @@ -2590,7 +2590,7 @@ func (_c *Fpdf_GetTextSpotColor_Call) RunAndReturn(run func() (string, byte, byt return _c } -// GetX provides a mock function with given fields: +// GetX provides a mock function with no fields func (_m *Fpdf) GetX() float64 { ret := _m.Called() @@ -2635,7 +2635,7 @@ func (_c *Fpdf_GetX_Call) RunAndReturn(run func() float64) *Fpdf_GetX_Call { return _c } -// GetXY provides a mock function with given fields: +// GetXY provides a mock function with no fields func (_m *Fpdf) GetXY() (float64, float64) { ret := _m.Called() @@ -2690,7 +2690,7 @@ func (_c *Fpdf_GetXY_Call) RunAndReturn(run func() (float64, float64)) *Fpdf_Get return _c } -// GetY provides a mock function with given fields: +// GetY provides a mock function with no fields func (_m *Fpdf) GetY() float64 { ret := _m.Called() @@ -2735,7 +2735,7 @@ func (_c *Fpdf_GetY_Call) RunAndReturn(run func() float64) *Fpdf_GetY_Call { return _c } -// HTMLBasicNew provides a mock function with given fields: +// HTMLBasicNew provides a mock function with no fields func (_m *Fpdf) HTMLBasicNew() gofpdf.HTMLBasicType { ret := _m.Called() @@ -2817,7 +2817,7 @@ func (_c *Fpdf_Image_Call) Return() *Fpdf_Image_Call { } func (_c *Fpdf_Image_Call) RunAndReturn(run func(string, float64, float64, float64, float64, bool, string, int, string)) *Fpdf_Image_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2858,7 +2858,7 @@ func (_c *Fpdf_ImageOptions_Call) Return() *Fpdf_ImageOptions_Call { } func (_c *Fpdf_ImageOptions_Call) RunAndReturn(run func(string, float64, float64, float64, float64, bool, gofpdf.ImageOptions, int, string)) *Fpdf_ImageOptions_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2940,7 +2940,7 @@ func (_c *Fpdf_Line_Call) Return() *Fpdf_Line_Call { } func (_c *Fpdf_Line_Call) RunAndReturn(run func(float64, float64, float64, float64)) *Fpdf_Line_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -2974,7 +2974,7 @@ func (_c *Fpdf_LineTo_Call) Return() *Fpdf_LineTo_Call { } func (_c *Fpdf_LineTo_Call) RunAndReturn(run func(float64, float64)) *Fpdf_LineTo_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3020,7 +3020,7 @@ func (_c *Fpdf_LinearGradient_Call) Return() *Fpdf_LinearGradient_Call { } func (_c *Fpdf_LinearGradient_Call) RunAndReturn(run func(float64, float64, float64, float64, int, int, int, int, int, int, float64, float64, float64, float64)) *Fpdf_LinearGradient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3057,7 +3057,7 @@ func (_c *Fpdf_Link_Call) Return() *Fpdf_Link_Call { } func (_c *Fpdf_Link_Call) RunAndReturn(run func(float64, float64, float64, float64, int)) *Fpdf_Link_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3094,7 +3094,7 @@ func (_c *Fpdf_LinkString_Call) Return() *Fpdf_LinkString_Call { } func (_c *Fpdf_LinkString_Call) RunAndReturn(run func(float64, float64, float64, float64, string)) *Fpdf_LinkString_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3127,7 +3127,7 @@ func (_c *Fpdf_Ln_Call) Return() *Fpdf_Ln_Call { } func (_c *Fpdf_Ln_Call) RunAndReturn(run func(float64)) *Fpdf_Ln_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3161,7 +3161,7 @@ func (_c *Fpdf_MoveTo_Call) Return() *Fpdf_MoveTo_Call { } func (_c *Fpdf_MoveTo_Call) RunAndReturn(run func(float64, float64)) *Fpdf_MoveTo_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3199,11 +3199,11 @@ func (_c *Fpdf_MultiCell_Call) Return() *Fpdf_MultiCell_Call { } func (_c *Fpdf_MultiCell_Call) RunAndReturn(run func(float64, float64, string, string, string, bool)) *Fpdf_MultiCell_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// Ok provides a mock function with given fields: +// Ok provides a mock function with no fields func (_m *Fpdf) Ok() bool { ret := _m.Called() @@ -3248,7 +3248,7 @@ func (_c *Fpdf_Ok_Call) RunAndReturn(run func() bool) *Fpdf_Ok_Call { return _c } -// OpenLayerPane provides a mock function with given fields: +// OpenLayerPane provides a mock function with no fields func (_m *Fpdf) OpenLayerPane() { _m.Called() } @@ -3276,7 +3276,7 @@ func (_c *Fpdf_OpenLayerPane_Call) Return() *Fpdf_OpenLayerPane_Call { } func (_c *Fpdf_OpenLayerPane_Call) RunAndReturn(run func()) *Fpdf_OpenLayerPane_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3418,7 +3418,7 @@ func (_c *Fpdf_OutputFileAndClose_Call) RunAndReturn(run func(string) error) *Fp return _c } -// PageCount provides a mock function with given fields: +// PageCount provides a mock function with no fields func (_m *Fpdf) PageCount() int { ret := _m.Called() @@ -3463,7 +3463,7 @@ func (_c *Fpdf_PageCount_Call) RunAndReturn(run func() int) *Fpdf_PageCount_Call return _c } -// PageNo provides a mock function with given fields: +// PageNo provides a mock function with no fields func (_m *Fpdf) PageNo() int { ret := _m.Called() @@ -3693,7 +3693,7 @@ func (_c *Fpdf_Polygon_Call) Return() *Fpdf_Polygon_Call { } func (_c *Fpdf_Polygon_Call) RunAndReturn(run func([]gofpdf.PointType, string)) *Fpdf_Polygon_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3740,7 +3740,7 @@ func (_c *Fpdf_RadialGradient_Call) Return() *Fpdf_RadialGradient_Call { } func (_c *Fpdf_RadialGradient_Call) RunAndReturn(run func(float64, float64, float64, float64, int, int, int, int, int, int, float64, float64, float64, float64, float64)) *Fpdf_RadialGradient_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3773,7 +3773,7 @@ func (_c *Fpdf_RawWriteBuf_Call) Return() *Fpdf_RawWriteBuf_Call { } func (_c *Fpdf_RawWriteBuf_Call) RunAndReturn(run func(io.Reader)) *Fpdf_RawWriteBuf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3806,7 +3806,7 @@ func (_c *Fpdf_RawWriteStr_Call) Return() *Fpdf_RawWriteStr_Call { } func (_c *Fpdf_RawWriteStr_Call) RunAndReturn(run func(string)) *Fpdf_RawWriteStr_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3843,7 +3843,7 @@ func (_c *Fpdf_Rect_Call) Return() *Fpdf_Rect_Call { } func (_c *Fpdf_Rect_Call) RunAndReturn(run func(float64, float64, float64, float64, string)) *Fpdf_Rect_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -3877,7 +3877,7 @@ func (_c *Fpdf_RegisterAlias_Call) Return() *Fpdf_RegisterAlias_Call { } func (_c *Fpdf_RegisterAlias_Call) RunAndReturn(run func(string, string)) *Fpdf_RegisterAlias_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4109,7 +4109,7 @@ func (_c *Fpdf_SVGBasicWrite_Call) Return() *Fpdf_SVGBasicWrite_Call { } func (_c *Fpdf_SVGBasicWrite_Call) RunAndReturn(run func(*gofpdf.SVGBasicType, float64)) *Fpdf_SVGBasicWrite_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4142,7 +4142,7 @@ func (_c *Fpdf_SetAcceptPageBreakFunc_Call) Return() *Fpdf_SetAcceptPageBreakFun } func (_c *Fpdf_SetAcceptPageBreakFunc_Call) RunAndReturn(run func(func() bool)) *Fpdf_SetAcceptPageBreakFunc_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4176,7 +4176,7 @@ func (_c *Fpdf_SetAlpha_Call) Return() *Fpdf_SetAlpha_Call { } func (_c *Fpdf_SetAlpha_Call) RunAndReturn(run func(float64, string)) *Fpdf_SetAlpha_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4210,7 +4210,7 @@ func (_c *Fpdf_SetAuthor_Call) Return() *Fpdf_SetAuthor_Call { } func (_c *Fpdf_SetAuthor_Call) RunAndReturn(run func(string, bool)) *Fpdf_SetAuthor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4244,7 +4244,7 @@ func (_c *Fpdf_SetAutoPageBreak_Call) Return() *Fpdf_SetAutoPageBreak_Call { } func (_c *Fpdf_SetAutoPageBreak_Call) RunAndReturn(run func(bool, float64)) *Fpdf_SetAutoPageBreak_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4277,7 +4277,7 @@ func (_c *Fpdf_SetCatalogSort_Call) Return() *Fpdf_SetCatalogSort_Call { } func (_c *Fpdf_SetCatalogSort_Call) RunAndReturn(run func(bool)) *Fpdf_SetCatalogSort_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4310,7 +4310,7 @@ func (_c *Fpdf_SetCellMargin_Call) Return() *Fpdf_SetCellMargin_Call { } func (_c *Fpdf_SetCellMargin_Call) RunAndReturn(run func(float64)) *Fpdf_SetCellMargin_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4343,7 +4343,7 @@ func (_c *Fpdf_SetCompression_Call) Return() *Fpdf_SetCompression_Call { } func (_c *Fpdf_SetCompression_Call) RunAndReturn(run func(bool)) *Fpdf_SetCompression_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4376,7 +4376,7 @@ func (_c *Fpdf_SetCreationDate_Call) Return() *Fpdf_SetCreationDate_Call { } func (_c *Fpdf_SetCreationDate_Call) RunAndReturn(run func(time.Time)) *Fpdf_SetCreationDate_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4410,7 +4410,7 @@ func (_c *Fpdf_SetCreator_Call) Return() *Fpdf_SetCreator_Call { } func (_c *Fpdf_SetCreator_Call) RunAndReturn(run func(string, bool)) *Fpdf_SetCreator_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4444,7 +4444,7 @@ func (_c *Fpdf_SetDashPattern_Call) Return() *Fpdf_SetDashPattern_Call { } func (_c *Fpdf_SetDashPattern_Call) RunAndReturn(run func([]float64, float64)) *Fpdf_SetDashPattern_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4478,7 +4478,7 @@ func (_c *Fpdf_SetDisplayMode_Call) Return() *Fpdf_SetDisplayMode_Call { } func (_c *Fpdf_SetDisplayMode_Call) RunAndReturn(run func(string, string)) *Fpdf_SetDisplayMode_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4513,7 +4513,7 @@ func (_c *Fpdf_SetDrawColor_Call) Return() *Fpdf_SetDrawColor_Call { } func (_c *Fpdf_SetDrawColor_Call) RunAndReturn(run func(int, int, int)) *Fpdf_SetDrawColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4547,7 +4547,7 @@ func (_c *Fpdf_SetDrawSpotColor_Call) Return() *Fpdf_SetDrawSpotColor_Call { } func (_c *Fpdf_SetDrawSpotColor_Call) RunAndReturn(run func(string, byte)) *Fpdf_SetDrawSpotColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4580,7 +4580,7 @@ func (_c *Fpdf_SetError_Call) Return() *Fpdf_SetError_Call { } func (_c *Fpdf_SetError_Call) RunAndReturn(run func(error)) *Fpdf_SetError_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4624,7 +4624,7 @@ func (_c *Fpdf_SetErrorf_Call) Return() *Fpdf_SetErrorf_Call { } func (_c *Fpdf_SetErrorf_Call) RunAndReturn(run func(string, ...interface{})) *Fpdf_SetErrorf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4659,7 +4659,7 @@ func (_c *Fpdf_SetFillColor_Call) Return() *Fpdf_SetFillColor_Call { } func (_c *Fpdf_SetFillColor_Call) RunAndReturn(run func(int, int, int)) *Fpdf_SetFillColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4693,7 +4693,7 @@ func (_c *Fpdf_SetFillSpotColor_Call) Return() *Fpdf_SetFillSpotColor_Call { } func (_c *Fpdf_SetFillSpotColor_Call) RunAndReturn(run func(string, byte)) *Fpdf_SetFillSpotColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4728,7 +4728,7 @@ func (_c *Fpdf_SetFont_Call) Return() *Fpdf_SetFont_Call { } func (_c *Fpdf_SetFont_Call) RunAndReturn(run func(string, string, float64)) *Fpdf_SetFont_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4761,7 +4761,7 @@ func (_c *Fpdf_SetFontLoader_Call) Return() *Fpdf_SetFontLoader_Call { } func (_c *Fpdf_SetFontLoader_Call) RunAndReturn(run func(gofpdf.FontLoader)) *Fpdf_SetFontLoader_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4794,7 +4794,7 @@ func (_c *Fpdf_SetFontLocation_Call) Return() *Fpdf_SetFontLocation_Call { } func (_c *Fpdf_SetFontLocation_Call) RunAndReturn(run func(string)) *Fpdf_SetFontLocation_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4827,7 +4827,7 @@ func (_c *Fpdf_SetFontSize_Call) Return() *Fpdf_SetFontSize_Call { } func (_c *Fpdf_SetFontSize_Call) RunAndReturn(run func(float64)) *Fpdf_SetFontSize_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4860,7 +4860,7 @@ func (_c *Fpdf_SetFontStyle_Call) Return() *Fpdf_SetFontStyle_Call { } func (_c *Fpdf_SetFontStyle_Call) RunAndReturn(run func(string)) *Fpdf_SetFontStyle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4893,7 +4893,7 @@ func (_c *Fpdf_SetFontUnitSize_Call) Return() *Fpdf_SetFontUnitSize_Call { } func (_c *Fpdf_SetFontUnitSize_Call) RunAndReturn(run func(float64)) *Fpdf_SetFontUnitSize_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4926,7 +4926,7 @@ func (_c *Fpdf_SetFooterFunc_Call) Return() *Fpdf_SetFooterFunc_Call { } func (_c *Fpdf_SetFooterFunc_Call) RunAndReturn(run func(func())) *Fpdf_SetFooterFunc_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4959,7 +4959,7 @@ func (_c *Fpdf_SetFooterFuncLpi_Call) Return() *Fpdf_SetFooterFuncLpi_Call { } func (_c *Fpdf_SetFooterFuncLpi_Call) RunAndReturn(run func(func(bool))) *Fpdf_SetFooterFuncLpi_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -4992,7 +4992,7 @@ func (_c *Fpdf_SetHeaderFunc_Call) Return() *Fpdf_SetHeaderFunc_Call { } func (_c *Fpdf_SetHeaderFunc_Call) RunAndReturn(run func(func())) *Fpdf_SetHeaderFunc_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5026,11 +5026,11 @@ func (_c *Fpdf_SetHeaderFuncMode_Call) Return() *Fpdf_SetHeaderFuncMode_Call { } func (_c *Fpdf_SetHeaderFuncMode_Call) RunAndReturn(run func(func(), bool)) *Fpdf_SetHeaderFuncMode_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// SetHomeXY provides a mock function with given fields: +// SetHomeXY provides a mock function with no fields func (_m *Fpdf) SetHomeXY() { _m.Called() } @@ -5058,7 +5058,7 @@ func (_c *Fpdf_SetHomeXY_Call) Return() *Fpdf_SetHomeXY_Call { } func (_c *Fpdf_SetHomeXY_Call) RunAndReturn(run func()) *Fpdf_SetHomeXY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5091,7 +5091,7 @@ func (_c *Fpdf_SetJavascript_Call) Return() *Fpdf_SetJavascript_Call { } func (_c *Fpdf_SetJavascript_Call) RunAndReturn(run func(string)) *Fpdf_SetJavascript_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5125,7 +5125,7 @@ func (_c *Fpdf_SetKeywords_Call) Return() *Fpdf_SetKeywords_Call { } func (_c *Fpdf_SetKeywords_Call) RunAndReturn(run func(string, bool)) *Fpdf_SetKeywords_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5158,7 +5158,7 @@ func (_c *Fpdf_SetLeftMargin_Call) Return() *Fpdf_SetLeftMargin_Call { } func (_c *Fpdf_SetLeftMargin_Call) RunAndReturn(run func(float64)) *Fpdf_SetLeftMargin_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5191,7 +5191,7 @@ func (_c *Fpdf_SetLineCapStyle_Call) Return() *Fpdf_SetLineCapStyle_Call { } func (_c *Fpdf_SetLineCapStyle_Call) RunAndReturn(run func(string)) *Fpdf_SetLineCapStyle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5224,7 +5224,7 @@ func (_c *Fpdf_SetLineJoinStyle_Call) Return() *Fpdf_SetLineJoinStyle_Call { } func (_c *Fpdf_SetLineJoinStyle_Call) RunAndReturn(run func(string)) *Fpdf_SetLineJoinStyle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5257,7 +5257,7 @@ func (_c *Fpdf_SetLineWidth_Call) Return() *Fpdf_SetLineWidth_Call { } func (_c *Fpdf_SetLineWidth_Call) RunAndReturn(run func(float64)) *Fpdf_SetLineWidth_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5292,7 +5292,7 @@ func (_c *Fpdf_SetLink_Call) Return() *Fpdf_SetLink_Call { } func (_c *Fpdf_SetLink_Call) RunAndReturn(run func(int, float64, int)) *Fpdf_SetLink_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5327,7 +5327,7 @@ func (_c *Fpdf_SetMargins_Call) Return() *Fpdf_SetMargins_Call { } func (_c *Fpdf_SetMargins_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_SetMargins_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5360,7 +5360,7 @@ func (_c *Fpdf_SetPage_Call) Return() *Fpdf_SetPage_Call { } func (_c *Fpdf_SetPage_Call) RunAndReturn(run func(int)) *Fpdf_SetPage_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5397,7 +5397,7 @@ func (_c *Fpdf_SetPageBox_Call) Return() *Fpdf_SetPageBox_Call { } func (_c *Fpdf_SetPageBox_Call) RunAndReturn(run func(string, float64, float64, float64, float64)) *Fpdf_SetPageBox_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5431,7 +5431,7 @@ func (_c *Fpdf_SetPageBoxRec_Call) Return() *Fpdf_SetPageBoxRec_Call { } func (_c *Fpdf_SetPageBoxRec_Call) RunAndReturn(run func(string, gofpdf.PageBox)) *Fpdf_SetPageBoxRec_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5466,7 +5466,7 @@ func (_c *Fpdf_SetProtection_Call) Return() *Fpdf_SetProtection_Call { } func (_c *Fpdf_SetProtection_Call) RunAndReturn(run func(byte, string, string)) *Fpdf_SetProtection_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5499,7 +5499,7 @@ func (_c *Fpdf_SetRightMargin_Call) Return() *Fpdf_SetRightMargin_Call { } func (_c *Fpdf_SetRightMargin_Call) RunAndReturn(run func(float64)) *Fpdf_SetRightMargin_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5533,7 +5533,7 @@ func (_c *Fpdf_SetSubject_Call) Return() *Fpdf_SetSubject_Call { } func (_c *Fpdf_SetSubject_Call) RunAndReturn(run func(string, bool)) *Fpdf_SetSubject_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5568,7 +5568,7 @@ func (_c *Fpdf_SetTextColor_Call) Return() *Fpdf_SetTextColor_Call { } func (_c *Fpdf_SetTextColor_Call) RunAndReturn(run func(int, int, int)) *Fpdf_SetTextColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5602,7 +5602,7 @@ func (_c *Fpdf_SetTextSpotColor_Call) Return() *Fpdf_SetTextSpotColor_Call { } func (_c *Fpdf_SetTextSpotColor_Call) RunAndReturn(run func(string, byte)) *Fpdf_SetTextSpotColor_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5636,7 +5636,7 @@ func (_c *Fpdf_SetTitle_Call) Return() *Fpdf_SetTitle_Call { } func (_c *Fpdf_SetTitle_Call) RunAndReturn(run func(string, bool)) *Fpdf_SetTitle_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5669,7 +5669,7 @@ func (_c *Fpdf_SetTopMargin_Call) Return() *Fpdf_SetTopMargin_Call { } func (_c *Fpdf_SetTopMargin_Call) RunAndReturn(run func(float64)) *Fpdf_SetTopMargin_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5702,7 +5702,7 @@ func (_c *Fpdf_SetUnderlineThickness_Call) Return() *Fpdf_SetUnderlineThickness_ } func (_c *Fpdf_SetUnderlineThickness_Call) RunAndReturn(run func(float64)) *Fpdf_SetUnderlineThickness_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5735,7 +5735,7 @@ func (_c *Fpdf_SetX_Call) Return() *Fpdf_SetX_Call { } func (_c *Fpdf_SetX_Call) RunAndReturn(run func(float64)) *Fpdf_SetX_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5769,7 +5769,7 @@ func (_c *Fpdf_SetXY_Call) Return() *Fpdf_SetXY_Call { } func (_c *Fpdf_SetXY_Call) RunAndReturn(run func(float64, float64)) *Fpdf_SetXY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5802,7 +5802,7 @@ func (_c *Fpdf_SetXmpMetadata_Call) Return() *Fpdf_SetXmpMetadata_Call { } func (_c *Fpdf_SetXmpMetadata_Call) RunAndReturn(run func([]byte)) *Fpdf_SetXmpMetadata_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5835,7 +5835,7 @@ func (_c *Fpdf_SetY_Call) Return() *Fpdf_SetY_Call { } func (_c *Fpdf_SetY_Call) RunAndReturn(run func(float64)) *Fpdf_SetY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5888,7 +5888,7 @@ func (_c *Fpdf_SplitLines_Call) RunAndReturn(run func([]byte, float64) [][]byte) return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *Fpdf) String() string { ret := _m.Called() @@ -5964,7 +5964,7 @@ func (_c *Fpdf_Text_Call) Return() *Fpdf_Text_Call { } func (_c *Fpdf_Text_Call) RunAndReturn(run func(float64, float64, string)) *Fpdf_Text_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -5997,11 +5997,11 @@ func (_c *Fpdf_Transform_Call) Return() *Fpdf_Transform_Call { } func (_c *Fpdf_Transform_Call) RunAndReturn(run func(gofpdf.TransformMatrix)) *Fpdf_Transform_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// TransformBegin provides a mock function with given fields: +// TransformBegin provides a mock function with no fields func (_m *Fpdf) TransformBegin() { _m.Called() } @@ -6029,11 +6029,11 @@ func (_c *Fpdf_TransformBegin_Call) Return() *Fpdf_TransformBegin_Call { } func (_c *Fpdf_TransformBegin_Call) RunAndReturn(run func()) *Fpdf_TransformBegin_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// TransformEnd provides a mock function with given fields: +// TransformEnd provides a mock function with no fields func (_m *Fpdf) TransformEnd() { _m.Called() } @@ -6061,7 +6061,7 @@ func (_c *Fpdf_TransformEnd_Call) Return() *Fpdf_TransformEnd_Call { } func (_c *Fpdf_TransformEnd_Call) RunAndReturn(run func()) *Fpdf_TransformEnd_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6094,7 +6094,7 @@ func (_c *Fpdf_TransformMirrorHorizontal_Call) Return() *Fpdf_TransformMirrorHor } func (_c *Fpdf_TransformMirrorHorizontal_Call) RunAndReturn(run func(float64)) *Fpdf_TransformMirrorHorizontal_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6129,7 +6129,7 @@ func (_c *Fpdf_TransformMirrorLine_Call) Return() *Fpdf_TransformMirrorLine_Call } func (_c *Fpdf_TransformMirrorLine_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformMirrorLine_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6163,7 +6163,7 @@ func (_c *Fpdf_TransformMirrorPoint_Call) Return() *Fpdf_TransformMirrorPoint_Ca } func (_c *Fpdf_TransformMirrorPoint_Call) RunAndReturn(run func(float64, float64)) *Fpdf_TransformMirrorPoint_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6196,7 +6196,7 @@ func (_c *Fpdf_TransformMirrorVertical_Call) Return() *Fpdf_TransformMirrorVerti } func (_c *Fpdf_TransformMirrorVertical_Call) RunAndReturn(run func(float64)) *Fpdf_TransformMirrorVertical_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6231,7 +6231,7 @@ func (_c *Fpdf_TransformRotate_Call) Return() *Fpdf_TransformRotate_Call { } func (_c *Fpdf_TransformRotate_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformRotate_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6267,7 +6267,7 @@ func (_c *Fpdf_TransformScale_Call) Return() *Fpdf_TransformScale_Call { } func (_c *Fpdf_TransformScale_Call) RunAndReturn(run func(float64, float64, float64, float64)) *Fpdf_TransformScale_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6302,7 +6302,7 @@ func (_c *Fpdf_TransformScaleX_Call) Return() *Fpdf_TransformScaleX_Call { } func (_c *Fpdf_TransformScaleX_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformScaleX_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6337,7 +6337,7 @@ func (_c *Fpdf_TransformScaleXY_Call) Return() *Fpdf_TransformScaleXY_Call { } func (_c *Fpdf_TransformScaleXY_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformScaleXY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6372,7 +6372,7 @@ func (_c *Fpdf_TransformScaleY_Call) Return() *Fpdf_TransformScaleY_Call { } func (_c *Fpdf_TransformScaleY_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformScaleY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6408,7 +6408,7 @@ func (_c *Fpdf_TransformSkew_Call) Return() *Fpdf_TransformSkew_Call { } func (_c *Fpdf_TransformSkew_Call) RunAndReturn(run func(float64, float64, float64, float64)) *Fpdf_TransformSkew_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6443,7 +6443,7 @@ func (_c *Fpdf_TransformSkewX_Call) Return() *Fpdf_TransformSkewX_Call { } func (_c *Fpdf_TransformSkewX_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformSkewX_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6478,7 +6478,7 @@ func (_c *Fpdf_TransformSkewY_Call) Return() *Fpdf_TransformSkewY_Call { } func (_c *Fpdf_TransformSkewY_Call) RunAndReturn(run func(float64, float64, float64)) *Fpdf_TransformSkewY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6512,7 +6512,7 @@ func (_c *Fpdf_TransformTranslate_Call) Return() *Fpdf_TransformTranslate_Call { } func (_c *Fpdf_TransformTranslate_Call) RunAndReturn(run func(float64, float64)) *Fpdf_TransformTranslate_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6545,7 +6545,7 @@ func (_c *Fpdf_TransformTranslateX_Call) Return() *Fpdf_TransformTranslateX_Call } func (_c *Fpdf_TransformTranslateX_Call) RunAndReturn(run func(float64)) *Fpdf_TransformTranslateX_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6578,7 +6578,7 @@ func (_c *Fpdf_TransformTranslateY_Call) Return() *Fpdf_TransformTranslateY_Call } func (_c *Fpdf_TransformTranslateY_Call) RunAndReturn(run func(float64)) *Fpdf_TransformTranslateY_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6705,7 +6705,7 @@ func (_c *Fpdf_UseTemplate_Call) Return() *Fpdf_UseTemplate_Call { } func (_c *Fpdf_UseTemplate_Call) RunAndReturn(run func(gofpdf.Template)) *Fpdf_UseTemplate_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6740,7 +6740,7 @@ func (_c *Fpdf_UseTemplateScaled_Call) Return() *Fpdf_UseTemplateScaled_Call { } func (_c *Fpdf_UseTemplateScaled_Call) RunAndReturn(run func(gofpdf.Template, gofpdf.PointType, gofpdf.SizeType)) *Fpdf_UseTemplateScaled_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6774,7 +6774,7 @@ func (_c *Fpdf_Write_Call) Return() *Fpdf_Write_Call { } func (_c *Fpdf_Write_Call) RunAndReturn(run func(float64, string)) *Fpdf_Write_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6810,7 +6810,7 @@ func (_c *Fpdf_WriteAligned_Call) Return() *Fpdf_WriteAligned_Call { } func (_c *Fpdf_WriteAligned_Call) RunAndReturn(run func(float64, float64, string, string)) *Fpdf_WriteAligned_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6845,7 +6845,7 @@ func (_c *Fpdf_WriteLinkID_Call) Return() *Fpdf_WriteLinkID_Call { } func (_c *Fpdf_WriteLinkID_Call) RunAndReturn(run func(float64, string, int)) *Fpdf_WriteLinkID_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6880,7 +6880,7 @@ func (_c *Fpdf_WriteLinkString_Call) Return() *Fpdf_WriteLinkString_Call { } func (_c *Fpdf_WriteLinkString_Call) RunAndReturn(run func(float64, string, string)) *Fpdf_WriteLinkString_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -6925,7 +6925,7 @@ func (_c *Fpdf_Writef_Call) Return() *Fpdf_Writef_Call { } func (_c *Fpdf_Writef_Call) RunAndReturn(run func(float64, string, ...interface{})) *Fpdf_Writef_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/HeatMap.go b/mocks/HeatMap.go new file mode 100644 index 00000000..0c4d7174 --- /dev/null +++ b/mocks/HeatMap.go @@ -0,0 +1,73 @@ +// Code generated by mockery v2.50.0. DO NOT EDIT. + +package mocks + +import ( + entity "github.com/johnfercher/maroto/v2/pkg/core/entity" + "github.com/johnfercher/maroto/v2/pkg/props" + mock "github.com/stretchr/testify/mock" +) + +// HeatMap is an autogenerated mock type for the HeatMap type +type HeatMap struct { + mock.Mock +} + +type HeatMap_Expecter struct { + mock *mock.Mock +} + +func (_m *HeatMap) EXPECT() *HeatMap_Expecter { + return &HeatMap_Expecter{mock: &_m.Mock} +} + +// Add provides a mock function with given fields: heatMap, max, cell, margins +func (_m *HeatMap) Add(heatMap [][]int, cell *entity.Cell, margins *entity.Margins, prop *props.HeatMap) { + _m.Called(heatMap, prop, cell, margins) +} + +// HeatMap_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type HeatMap_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - heatMap [][]int +// - max int +// - cell *entity.Cell +// - margins *entity.Margins +func (_e *HeatMap_Expecter) Add(heatMap interface{}, max interface{}, cell interface{}, margins interface{}) *HeatMap_Add_Call { + return &HeatMap_Add_Call{Call: _e.mock.On("Add", heatMap, max, cell, margins)} +} + +func (_c *HeatMap_Add_Call) Run(run func(heatMap [][]int, max int, cell *entity.Cell, margins *entity.Margins)) *HeatMap_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([][]int), args[1].(int), args[2].(*entity.Cell), args[3].(*entity.Margins)) + }) + return _c +} + +func (_c *HeatMap_Add_Call) Return() *HeatMap_Add_Call { + _c.Call.Return() + return _c +} + +func (_c *HeatMap_Add_Call) RunAndReturn(run func([][]int, int, *entity.Cell, *entity.Margins)) *HeatMap_Add_Call { + _c.Run(run) + return _c +} + +// NewHeatMap creates a new instance of HeatMap. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewHeatMap(t interface { + mock.TestingT + Cleanup(func()) +}, +) *HeatMap { + mock := &HeatMap{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/Image.go b/mocks/Image.go index fa0bebda..c6167f15 100644 --- a/mocks/Image.go +++ b/mocks/Image.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks diff --git a/mocks/Line.go b/mocks/Line.go index 080731fc..a352f724 100644 --- a/mocks/Line.go +++ b/mocks/Line.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -52,7 +52,7 @@ func (_c *Line_Add_Call) Return() *Line_Add_Call { } func (_c *Line_Add_Call) RunAndReturn(run func(*entity.Cell, *props.Line)) *Line_Add_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Listable.go b/mocks/Listable.go index d9d28d9f..dc6806a2 100644 --- a/mocks/Listable.go +++ b/mocks/Listable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -69,7 +69,7 @@ func (_c *Listable_GetContent_Call) RunAndReturn(run func(int) core.Row) *Listab return _c } -// GetHeader provides a mock function with given fields: +// GetHeader provides a mock function with no fields func (_m *Listable) GetHeader() core.Row { ret := _m.Called() diff --git a/mocks/Maroto.go b/mocks/Maroto.go index 90fb026b..07d4a334 100644 --- a/mocks/Maroto.go +++ b/mocks/Maroto.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -127,7 +127,7 @@ func (_c *Maroto_AddPages_Call) Return() *Maroto_AddPages_Call { } func (_c *Maroto_AddPages_Call) RunAndReturn(run func(...core.Page)) *Maroto_AddPages_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -236,7 +236,7 @@ func (_c *Maroto_AddRows_Call) Return() *Maroto_AddRows_Call { } func (_c *Maroto_AddRows_Call) RunAndReturn(run func(...core.Row)) *Maroto_AddRows_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -286,7 +286,7 @@ func (_c *Maroto_FitlnCurrentPage_Call) RunAndReturn(run func(float64) bool) *Ma return _c } -// Generate provides a mock function with given fields: +// Generate provides a mock function with no fields func (_m *Maroto) Generate() (core.Document, error) { ret := _m.Called() @@ -343,7 +343,7 @@ func (_c *Maroto_Generate_Call) RunAndReturn(run func() (core.Document, error)) return _c } -// GetCurrentConfig provides a mock function with given fields: +// GetCurrentConfig provides a mock function with no fields func (_m *Maroto) GetCurrentConfig() *entity.Config { ret := _m.Called() @@ -390,7 +390,7 @@ func (_c *Maroto_GetCurrentConfig_Call) RunAndReturn(run func() *entity.Config) return _c } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Maroto) GetStructure() *node.Node[core.Structure] { ret := _m.Called() diff --git a/mocks/Math.go b/mocks/Math.go index fad2cbf5..4f584e96 100644 --- a/mocks/Math.go +++ b/mocks/Math.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks diff --git a/mocks/Node.go b/mocks/Node.go index 29bf2a8d..2770315c 100644 --- a/mocks/Node.go +++ b/mocks/Node.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -24,7 +24,7 @@ func (_m *Node) EXPECT() *Node_Expecter { return &Node_Expecter{mock: &_m.Mock} } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Node) GetStructure() *node.Node[core.Structure] { ret := _m.Called() @@ -100,7 +100,7 @@ func (_c *Node_SetConfig_Call) Return() *Node_SetConfig_Call { } func (_c *Node_SetConfig_Call) RunAndReturn(run func(*entity.Config)) *Node_SetConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Page.go b/mocks/Page.go index da968dc0..3e33765b 100644 --- a/mocks/Page.go +++ b/mocks/Page.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -85,7 +85,7 @@ func (_c *Page_Add_Call) RunAndReturn(run func(...core.Row) core.Page) *Page_Add return _c } -// GetNumber provides a mock function with given fields: +// GetNumber provides a mock function with no fields func (_m *Page) GetNumber() int { ret := _m.Called() @@ -130,7 +130,7 @@ func (_c *Page_GetNumber_Call) RunAndReturn(run func() int) *Page_GetNumber_Call return _c } -// GetRows provides a mock function with given fields: +// GetRows provides a mock function with no fields func (_m *Page) GetRows() []core.Row { ret := _m.Called() @@ -177,7 +177,7 @@ func (_c *Page_GetRows_Call) RunAndReturn(run func() []core.Row) *Page_GetRows_C return _c } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Page) GetStructure() *node.Node[core.Structure] { ret := _m.Called() @@ -254,7 +254,7 @@ func (_c *Page_Render_Call) Return() *Page_Render_Call { } func (_c *Page_Render_Call) RunAndReturn(run func(core.Provider, entity.Cell)) *Page_Render_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -287,7 +287,7 @@ func (_c *Page_SetConfig_Call) Return() *Page_SetConfig_Call { } func (_c *Page_SetConfig_Call) RunAndReturn(run func(*entity.Config)) *Page_SetConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -321,7 +321,7 @@ func (_c *Page_SetNumber_Call) Return() *Page_SetNumber_Call { } func (_c *Page_SetNumber_Call) RunAndReturn(run func(int, int)) *Page_SetNumber_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Provider.go b/mocks/Provider.go index dd7b2bf4..b8931448 100644 --- a/mocks/Provider.go +++ b/mocks/Provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -56,7 +56,7 @@ func (_c *Provider_AddBackgroundImageFromBytes_Call) Return() *Provider_AddBackg } func (_c *Provider_AddBackgroundImageFromBytes_Call) RunAndReturn(run func([]byte, *entity.Cell, *props.Rect, extension.Type)) *Provider_AddBackgroundImageFromBytes_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -91,7 +91,42 @@ func (_c *Provider_AddBarCode_Call) Return() *Provider_AddBarCode_Call { } func (_c *Provider_AddBarCode_Call) RunAndReturn(run func(string, *entity.Cell, *props.Barcode)) *Provider_AddBarCode_Call { - _c.Call.Return(run) + _c.Run(run) + return _c +} + +// AddHeatMap provides a mock function with given fields: heatMap, max, cell +func (_m *Provider) AddHeatMap(heatMap [][]int, cell *entity.Cell, prop *props.HeatMap) { + _m.Called(heatMap, prop, cell) +} + +// Provider_AddHeatMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHeatMap' +type Provider_AddHeatMap_Call struct { + *mock.Call +} + +// AddHeatMap is a helper method to define mock.On call +// - heatMap [][]int +// - max int +// - cell *entity.Cell +func (_e *Provider_Expecter) AddHeatMap(heatMap interface{}, max interface{}, cell interface{}) *Provider_AddHeatMap_Call { + return &Provider_AddHeatMap_Call{Call: _e.mock.On("AddHeatMap", heatMap, max, cell)} +} + +func (_c *Provider_AddHeatMap_Call) Run(run func(heatMap [][]int, max int, cell *entity.Cell)) *Provider_AddHeatMap_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([][]int), args[1].(int), args[2].(*entity.Cell)) + }) + return _c +} + +func (_c *Provider_AddHeatMap_Call) Return() *Provider_AddHeatMap_Call { + _c.Call.Return() + return _c +} + +func (_c *Provider_AddHeatMap_Call) RunAndReturn(run func([][]int, int, *entity.Cell)) *Provider_AddHeatMap_Call { + _c.Run(run) return _c } @@ -127,7 +162,7 @@ func (_c *Provider_AddImageFromBytes_Call) Return() *Provider_AddImageFromBytes_ } func (_c *Provider_AddImageFromBytes_Call) RunAndReturn(run func([]byte, *entity.Cell, *props.Rect, extension.Type)) *Provider_AddImageFromBytes_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -162,7 +197,7 @@ func (_c *Provider_AddImageFromFile_Call) Return() *Provider_AddImageFromFile_Ca } func (_c *Provider_AddImageFromFile_Call) RunAndReturn(run func(string, *entity.Cell, *props.Rect)) *Provider_AddImageFromFile_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -196,7 +231,7 @@ func (_c *Provider_AddLine_Call) Return() *Provider_AddLine_Call { } func (_c *Provider_AddLine_Call) RunAndReturn(run func(*entity.Cell, *props.Line)) *Provider_AddLine_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -231,7 +266,7 @@ func (_c *Provider_AddMatrixCode_Call) Return() *Provider_AddMatrixCode_Call { } func (_c *Provider_AddMatrixCode_Call) RunAndReturn(run func(string, *entity.Cell, *props.Rect)) *Provider_AddMatrixCode_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -266,7 +301,7 @@ func (_c *Provider_AddQrCode_Call) Return() *Provider_AddQrCode_Call { } func (_c *Provider_AddQrCode_Call) RunAndReturn(run func(string, *entity.Cell, *props.Rect)) *Provider_AddQrCode_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -301,7 +336,7 @@ func (_c *Provider_AddText_Call) Return() *Provider_AddText_Call { } func (_c *Provider_AddText_Call) RunAndReturn(run func(string, *entity.Cell, *props.Text)) *Provider_AddText_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -337,7 +372,7 @@ func (_c *Provider_CreateCol_Call) Return() *Provider_CreateCol_Call { } func (_c *Provider_CreateCol_Call) RunAndReturn(run func(float64, float64, *entity.Config, *props.Cell)) *Provider_CreateCol_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -370,11 +405,11 @@ func (_c *Provider_CreateRow_Call) Return() *Provider_CreateRow_Call { } func (_c *Provider_CreateRow_Call) RunAndReturn(run func(float64)) *Provider_CreateRow_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// GenerateBytes provides a mock function with given fields: +// GenerateBytes provides a mock function with no fields func (_m *Provider) GenerateBytes() ([]byte, error) { ret := _m.Called() @@ -787,7 +822,7 @@ func (_c *Provider_SetCompression_Call) Return() *Provider_SetCompression_Call { } func (_c *Provider_SetCompression_Call) RunAndReturn(run func(bool)) *Provider_SetCompression_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -820,7 +855,7 @@ func (_c *Provider_SetMetadata_Call) Return() *Provider_SetMetadata_Call { } func (_c *Provider_SetMetadata_Call) RunAndReturn(run func(*entity.Metadata)) *Provider_SetMetadata_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -853,7 +888,7 @@ func (_c *Provider_SetProtection_Call) Return() *Provider_SetProtection_Call { } func (_c *Provider_SetProtection_Call) RunAndReturn(run func(*entity.Protection)) *Provider_SetProtection_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Repository.go b/mocks/Repository.go index 3977c94e..2611ec5e 100644 --- a/mocks/Repository.go +++ b/mocks/Repository.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -124,7 +124,7 @@ func (_c *Repository_AddUTF8FontFromBytes_Call) RunAndReturn(run func(string, fo return _c } -// Load provides a mock function with given fields: +// Load provides a mock function with no fields func (_m *Repository) Load() ([]*entity.CustomFont, error) { ret := _m.Called() diff --git a/mocks/Row.go b/mocks/Row.go index f8e8a69c..580c89a7 100644 --- a/mocks/Row.go +++ b/mocks/Row.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -87,7 +87,7 @@ func (_c *Row_Add_Call) RunAndReturn(run func(...core.Col) core.Row) *Row_Add_Ca return _c } -// GetColumns provides a mock function with given fields: +// GetColumns provides a mock function with no fields func (_m *Row) GetColumns() []core.Col { ret := _m.Called() @@ -181,7 +181,7 @@ func (_c *Row_GetHeight_Call) RunAndReturn(run func(core.Provider, *entity.Cell) return _c } -// GetStructure provides a mock function with given fields: +// GetStructure provides a mock function with no fields func (_m *Row) GetStructure() *node.Node[core.Structure] { ret := _m.Called() @@ -258,7 +258,7 @@ func (_c *Row_Render_Call) Return() *Row_Render_Call { } func (_c *Row_Render_Call) RunAndReturn(run func(core.Provider, entity.Cell)) *Row_Render_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -291,7 +291,7 @@ func (_c *Row_SetConfig_Call) Return() *Row_SetConfig_Call { } func (_c *Row_SetConfig_Call) RunAndReturn(run func(*entity.Config)) *Row_SetConfig_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/Text.go b/mocks/Text.go index 781e9117..d88b2e0f 100644 --- a/mocks/Text.go +++ b/mocks/Text.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. +// Code generated by mockery v2.50.0. DO NOT EDIT. package mocks @@ -53,7 +53,7 @@ func (_c *Text_Add_Call) Return() *Text_Add_Call { } func (_c *Text_Add_Call) RunAndReturn(run func(string, *entity.Cell, *props.Text)) *Text_Add_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/pkg/components/chart/heatmap.go b/pkg/components/chart/heatmap.go new file mode 100644 index 00000000..349e12af --- /dev/null +++ b/pkg/components/chart/heatmap.go @@ -0,0 +1,64 @@ +package chart + +import ( + "github.com/johnfercher/go-tree/node" + "github.com/johnfercher/maroto/v2/pkg/components/col" + "github.com/johnfercher/maroto/v2/pkg/components/row" + "github.com/johnfercher/maroto/v2/pkg/core" + "github.com/johnfercher/maroto/v2/pkg/core/entity" + "github.com/johnfercher/maroto/v2/pkg/props" +) + +type HeatMap struct { + name string + heat [][]int + prop props.HeatMap + config *entity.Config +} + +func NewHeatMap(name string, heat [][]int, ps ...props.HeatMap) core.Component { + prop := props.HeatMap{} + if len(ps) > 0 { + prop = ps[0] + } + prop.MakeValid() + + return &HeatMap{ + name: name, + prop: prop, + heat: heat, + } +} + +func NewHeatMapCol(size int, name string, heat [][]int, ps ...props.HeatMap) core.Col { + heatMap := NewHeatMap(name, heat, ps...) + return col.New(size).Add(heatMap) +} + +func NewHeatMapRow(height float64, name string, heat [][]int, ps ...props.HeatMap) core.Row { + heatMap := NewHeatMap(name, heat, ps...) + c := col.New().Add(heatMap) + return row.New(height).Add(c) +} + +func (b *HeatMap) Render(provider core.Provider, cell *entity.Cell) { + provider.AddHeatMap(b.heat, cell, &b.prop) +} + +func (b *HeatMap) GetStructure() *node.Node[core.Structure] { + str := core.Structure{ + Type: "heatmap", + Value: b.name, + Details: b.prop.ToMap(), + } + + return node.New(str) +} + +func (b *HeatMap) GetHeight(provider core.Provider, cell *entity.Cell) float64 { + return float64(len(b.heat)) +} + +func (b *HeatMap) SetConfig(config *entity.Config) { + b.config = config +} diff --git a/pkg/consts/heat/heat.go b/pkg/consts/heat/heat.go new file mode 100644 index 00000000..45eb048f --- /dev/null +++ b/pkg/consts/heat/heat.go @@ -0,0 +1,12 @@ +package heat + +type Style string + +const ( + RectStyle Style = "rect" + CircleStyle Style = "circle" +) + +func (s Style) IsValid() bool { + return s == RectStyle || s == CircleStyle +} diff --git a/pkg/core/components.go b/pkg/core/components.go index f24cd6f1..5178b8bb 100644 --- a/pkg/core/components.go +++ b/pkg/core/components.go @@ -28,6 +28,7 @@ type Image interface { GetImageInfo(img *entity.Image, extension extension.Type) (*gofpdf.ImageInfoType, uuid.UUID) } +// Line is the abstraction which deals with lines in a PDF. type Line interface { Add(cell *entity.Cell, prop *props.Line) } @@ -52,3 +53,12 @@ type Font interface { SetColor(color *props.Color) GetColor() *props.Color } + +// HeatMap is the abstraction which deals with heapmap charts. +type HeatMap interface { + Add(heatMap [][]int, cell *entity.Cell, margins *entity.Margins, prop *props.HeatMap) +} + +type Chart interface { + Add(cell *entity.Cell, margins *entity.Margins, prop *props.Chart) +} diff --git a/pkg/core/provider.go b/pkg/core/provider.go index 72ce633b..c56839d0 100644 --- a/pkg/core/provider.go +++ b/pkg/core/provider.go @@ -20,6 +20,7 @@ type Provider interface { AddMatrixCode(code string, cell *entity.Cell, prop *props.Rect) AddQrCode(code string, cell *entity.Cell, rect *props.Rect) AddBarCode(code string, cell *entity.Cell, prop *props.Barcode) + AddHeatMap(heatMap [][]int, cell *entity.Cell, prop *props.HeatMap) GetDimensionsByMatrixCode(code string) (*entity.Dimensions, error) GetDimensionsByImageByte(bytes []byte, extension extension.Type) (*entity.Dimensions, error) GetDimensionsByImage(file string) (*entity.Dimensions, error) diff --git a/pkg/core/structure.go b/pkg/core/structure.go index d0a528a5..3272a7c3 100644 --- a/pkg/core/structure.go +++ b/pkg/core/structure.go @@ -3,6 +3,6 @@ package core // Structure is the representation of the component tree structure. type Structure struct { Type string - Value interface{} - Details map[string]interface{} + Value any + Details map[string]any } diff --git a/pkg/props/chart.go b/pkg/props/chart.go new file mode 100644 index 00000000..9b92b0ff --- /dev/null +++ b/pkg/props/chart.go @@ -0,0 +1,7 @@ +package props + +type Chart struct { + Axis bool + XLabel string + YLabel string +} diff --git a/pkg/props/heatmap.go b/pkg/props/heatmap.go new file mode 100644 index 00000000..a9ccbc83 --- /dev/null +++ b/pkg/props/heatmap.go @@ -0,0 +1,26 @@ +package props + +type HeatMap struct { + TransparentValues []int + HalfColor bool + InvertScale bool + Chart *Chart +} + +func (h *HeatMap) MakeValid() { + +} + +func (h *HeatMap) ToMap() map[string]any { + if h == nil { + return nil + } + + m := make(map[string]interface{}) + + if len(h.TransparentValues) > 0 { + m["prop_transparent_values"] = h.TransparentValues + } + + return m +} diff --git a/pkg/props/line.go b/pkg/props/line.go index 02a35118..e6b68bd6 100644 --- a/pkg/props/line.go +++ b/pkg/props/line.go @@ -11,7 +11,7 @@ type Line struct { Color *Color // Style define the line style (solid or dashed). Style linestyle.Type - // Thickness define the line thicknesl. + // Thickness define the line thickness. Thickness float64 // Orientation define if line would be horizontal or vertical. Orientation orientation.Type