props

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Barcode

type Barcode struct {
	// Left is the space between the left cell boundary to the barcode, if center is false
	Left float64
	// Top is space between the upper cell limit to the barcode, if center is false
	Top float64
	// Percent is how much the barcode will occupy the cell,
	// ex 100%: The barcode will fulfill the entire cell
	// ex 50%: The greater side from the barcode will have half the size of the cell
	Percent float64
	// Proportion is the proportion between size of the barcode
	// Ex: 16x9, 4x3...
	Proportion Proportion
	// Center define that the barcode will be vertically and horizontally centralized
	Center bool
}

Barcode represents properties from a barcode inside a cell

func (*Barcode) MakeValid

func (r *Barcode) MakeValid()

MakeValid from Barcode means will make the properties from a barcode reliable to fit inside a cell and define default values for a barcode

type Font

type Font struct {
	// Family of the text, ex: consts.Arial, helvetica and etc
	Family consts.Family
	// Style of the text, ex: consts.Normal, bold and etc
	Style consts.Style
	// Size of the text
	Size float64
}

Font represents properties from a text

func (*Font) MakeValid

func (f *Font) MakeValid()

MakeValid from Font define default values for a Signature

func (*Font) ToTextProp

func (f *Font) ToTextProp(align consts.Align, top float64) Text

ToTextProp from Font return a Text based on Font

type Proportion

type Proportion struct {
	// Width from the rectangle: Barcode, image and etc
	Width float64
	// Height from the rectangle: Barcode, image and etc
	Height float64
}

Proportion represents a proportion from a rectangle, example: 16x9, 4x3...

type Rect

type Rect struct {
	// Left is the space between the left cell boundary to the rectangle, if center is false
	Left float64
	// Top is space between the upper cell limit to the barcode, if center is false
	Top float64
	// Percent is how much the rectangle will occupy the cell,
	// ex 100%: The rectangle will fulfill the entire cell
	// ex 50%: The greater side from the rectangle will have half the size of the cell
	Percent float64
	// Center define that the barcode will be vertically and horizontally centralized
	Center bool
}

Rect represents properties from a rectangle (Image, QrCode or Barcode) inside a cell

func (*Rect) MakeValid

func (r *Rect) MakeValid()

MakeValid from Rect means will make the properties from a rectangle reliable to fit inside a cell and define default values for a rectangle

type TableList

type TableList struct {
	// HeaderHeight is the height of the cell with headers
	HeaderHeight float64
	// HeaderProp is the custom properties of the text inside
	// the headers
	HeaderProp Font
	// ContentHeight is the height of the cells with contents
	ContentHeight float64
	// ContentProp is the custom properties of the text inside
	// the contents
	ContentProp Font
	// Align is the align of the text (header and content) inside the columns
	Align consts.Align
	// HeaderContentSpace is the space between the header and the contents
	HeaderContentSpace float64
	// Width Multipliers for columns in list, default 1
	WidthMultipliers []int
	// Number of col spaces made, used with width multipliers
	ColSpaces int
}

TableList represents properties from a TableList

func (*TableList) MakeValid

func (t *TableList) MakeValid()

MakeValid from TableList define default values for a TableList

type Text

type Text struct {
	// Top is space between the upper cell limit to the barcode, if align is not center
	Top float64
	// Family of the text, ex: consts.Arial, helvetica and etc
	Family consts.Family
	// Style of the text, ex: consts.Normal, bold and etc
	Style consts.Style
	// Size of the text
	Size float64
	// Align of the text
	Align consts.Align
	// Extrapolate define if the text will automatically add a new line when
	// text reach the right cell boundary
	Extrapolate bool
}

Text represents properties from a Text inside a cell

func (*Text) MakeValid

func (f *Text) MakeValid()

MakeValid from Text define default values for a Text

Jump to

Keyboard shortcuts

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