engine

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Error() error
	WritePDF(io.Writer) error
	SetPageCountAlias(alias string)
	CurrentPage() int
	OnHeader(func())
	OnFooter(func())
	AddPage()
	SetX(x float64)
	SetY(y float64)
	GetXY() (float64, float64)
	LineFeed(lines float64)
	ChangeFont(fnt style.Font)
	PrintableArea() (x0, y0, x1, y1 float64)
	PageWidth() float64
	PageHeight() float64
	PutImage(src string, x, y, width, height float64)
	SetTextColor(r, g, b int)
	FontHeight() float64
	MonoFont() string
	TextWidth(s string) float64
	WriteText(s string)
	Margins() (left, top, right, bottom float64)

	//drawing stuff
	SetLineWidth(float64)
	SetDrawColor(r, g, b int)
	SetFillColor(r, g, b int)
	FillRect(x, y, width, height float64)
	MoveTo(x, y float64)
	LineTo(x, y float64)
	DrawPath()
}

type FPDF

type FPDF struct {
	// contains filtered or unexported fields
}

func NewFPDF

func NewFPDF(fonts *font.Registry, doc *xdoc.Document) (*FPDF, error)

func (*FPDF) AddPage

func (e *FPDF) AddPage()

func (*FPDF) ChangeFont

func (e *FPDF) ChangeFont(fnt style.Font)

func (*FPDF) CurrentPage

func (e *FPDF) CurrentPage() int

func (*FPDF) DrawPath

func (e *FPDF) DrawPath()

func (*FPDF) Error

func (e *FPDF) Error() error

func (*FPDF) FillRect

func (e *FPDF) FillRect(x, y, width, height float64)

func (*FPDF) FontHeight

func (e *FPDF) FontHeight() float64

func (*FPDF) GetXY

func (e *FPDF) GetXY() (float64, float64)

func (*FPDF) LineFeed

func (e *FPDF) LineFeed(lines float64)

func (*FPDF) LineTo

func (e *FPDF) LineTo(x, y float64)

func (*FPDF) Margins

func (e *FPDF) Margins() (left, top, right, bottom float64)

func (*FPDF) MonoFont

func (e *FPDF) MonoFont() string

func (*FPDF) MoveTo

func (e *FPDF) MoveTo(x, y float64)

func (*FPDF) OnFooter

func (e *FPDF) OnFooter(f func())

func (*FPDF) OnHeader

func (e *FPDF) OnHeader(f func())

func (*FPDF) PageHeight

func (e *FPDF) PageHeight() float64

func (*FPDF) PageWidth

func (e *FPDF) PageWidth() float64

func (*FPDF) PrintableArea

func (e *FPDF) PrintableArea() (x0, y0, x1, y1 float64)

func (*FPDF) PutImage

func (e *FPDF) PutImage(src string, x, y, width, height float64)

func (*FPDF) SetDrawColor

func (e *FPDF) SetDrawColor(r, g, b int)

func (*FPDF) SetFillColor

func (e *FPDF) SetFillColor(r, g, b int)

func (*FPDF) SetLineWidth

func (e *FPDF) SetLineWidth(w float64)

drawing

func (*FPDF) SetPageCountAlias

func (e *FPDF) SetPageCountAlias(alias string)

func (*FPDF) SetTextColor

func (e *FPDF) SetTextColor(r, g, b int)

func (*FPDF) SetX

func (e *FPDF) SetX(x float64)

func (*FPDF) SetY

func (e *FPDF) SetY(y float64)

func (*FPDF) TextWidth

func (e *FPDF) TextWidth(s string) float64

func (*FPDF) WritePDF

func (e *FPDF) WritePDF(w io.Writer) error

func (*FPDF) WriteText

func (e *FPDF) WriteText(s string)

Jump to

Keyboard shortcuts

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