config

package
v2.0.0-alpha.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 2 Imported by: 22

Documentation

Index

Constants

View Source
const (
	A1      PageSize = "a1"
	A2      PageSize = "a2"
	A3      PageSize = "a3"
	A4      PageSize = "a4"
	A5      PageSize = "a5"
	A6      PageSize = "a6"
	Letter  PageSize = "letter"
	Legal   PageSize = "legal"
	Tabloid PageSize = "tabloid"

	MinTopMargin      = 10.0
	MinLeftMargin     = 10.0
	MinRightMargin    = 10.0
	MinBottomMargin   = 20.0
	DefaultFontSize   = 10.0
	DefaultMaxGridSum = 12.0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	WithPageSize(size PageSize) Builder
	WithDimensions(dimensions *Dimensions) Builder
	WithMargins(margins *Margins) Builder
	WithProvider(providerType provider.Type) Builder
	WithWorkerPoolSize(poolSize int) Builder
	WithDebug(on bool) Builder
	WithMaxGridSize(maxGridSize int) Builder
	WithFont(font *Font) Builder
	Build() *Maroto
}

func NewBuilder

func NewBuilder() Builder

type Dimensions

type Dimensions struct {
	Width  float64
	Height float64
}

func GetDimensions

func GetDimensions(pageSize PageSize) *Dimensions

type Font

type Font struct {
	Family string
	Style  consts.Style
	Size   float64
}

type Margins

type Margins struct {
	Left  float64
	Right float64
	Top   float64
}

type Maroto

type Maroto struct {
	ProviderType provider.Type
	Dimensions   *Dimensions
	Margins      *Margins
	Font         *Font
	Workers      int
	Debug        bool
	MaxGridSize  int
}

type PageSize

type PageSize string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL