signature

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 8 Imported by: 5

Documentation

Overview

Package signature implements creation of signatures.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(value string, ps ...props.Signature) core.Component

New is responsible to create an instance of a Signature.

Example

ExampleNew demonstrates how to create a signature component.

m := maroto.New()

signature := signature.New("signature label")
col := col.New(12).Add(signature)
m.AddRow(10, col)

// generate document
Output:

func NewAutoRow added in v2.1.0

func NewAutoRow(value string, ps ...props.Signature) core.Row

NewRow is responsible to create an instance of a Signature wrapped in a automatic Row.

func NewCol

func NewCol(size int, value string, ps ...props.Signature) core.Col

NewCol is responsible to create an instance of a Signature wrapped in a Col.

Example

ExampleNewCol demonstrates how to create a signature component wrapped into a column.

m := maroto.New()

signatureCol := signature.NewCol(12, "signature label")
m.AddRow(10, signatureCol)

// generate document
Output:

func NewRow

func NewRow(height float64, value string, ps ...props.Signature) core.Row

NewRow is responsible to create an instance of a Signature wrapped in a Row.

Example

ExampleNewRow demonstrates how to create a signature component wrapped into a row.

m := maroto.New()

signatureRow := signature.NewRow(10, "signature label")
m.AddRows(signatureRow)

// generate document
Output:

Types

type Signature

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

func (*Signature) GetHeight added in v2.1.0

func (s *Signature) GetHeight(provider core.Provider, cell *entity.Cell) float64

GetHeight returns the height that the signature will have in the PDF

func (*Signature) GetStructure

func (s *Signature) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of a Signature.

func (*Signature) Render

func (s *Signature) Render(provider core.Provider, cell *entity.Cell)

Render renders a Signature into a PDF context.

func (*Signature) SetConfig

func (s *Signature) SetConfig(config *entity.Config)

SetConfig sets the config.

Jump to

Keyboard shortcuts

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