line

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 6 Imported by: 6

Documentation

Overview

Package line implements creation of lines.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ps ...props.Line) core.Component

New is responsible to create an instance of a Line.

Example

ExampleNew demonstrates how create a line component.

m := maroto.New()

line := line.New()
col := col.New(12).Add(line)
m.AddRow(10, col)

// generate document
Output:

func NewAutoRow added in v2.1.0

func NewAutoRow(ps ...props.Line) core.Row

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

func NewCol

func NewCol(size int, ps ...props.Line) core.Col

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

Example

ExampleNewCol demonstrates how to crete a line wrapped into a column.

m := maroto.New()

lineCol := line.NewCol(12)
m.AddRow(10, lineCol)

// generate document
Output:

func NewRow

func NewRow(height float64, ps ...props.Line) core.Row

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

Example

ExampleNewRow demonstrates how to crete a line wrapped into a row.

m := maroto.New()

lineRow := line.NewRow(10)
m.AddRows(lineRow)

// generate document
Output:

Types

type Line

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

func (*Line) GetHeight added in v2.1.0

func (l *Line) GetHeight(provider core.Provider, cell *entity.Cell) float64

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

func (*Line) GetStructure

func (l *Line) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of a Line.

func (*Line) Render

func (l *Line) Render(provider core.Provider, cell *entity.Cell)

Render renders a Line into a PDF context.

func (*Line) SetConfig

func (l *Line) 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