items

package
v0.0.0-...-6f463b7 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anchor

type Anchor struct {
	Name string `toml:"name" json:"name"`
}

func (*Anchor) Render

func (i *Anchor) Render(pdf gopdfiface.GoPDFer, _ *types.FileStores, modelData *types.ModelData) error

type BlendMode

type BlendMode string
const (
	BlendModeHue        BlendMode = "hue"
	BlendModeColor      BlendMode = "color"
	BlendModeNormal     BlendMode = "normal"
	BlendModeDarken     BlendMode = "darken"
	BlendModeScreen     BlendMode = "screen"
	BlendModeOverlay    BlendMode = "overlay"
	BlendModeLighten    BlendMode = "lighten"
	BlendModeMultiply   BlendMode = "multiply"
	BlendModeExclusion  BlendMode = "exclusion"
	BlendModeColorBurn  BlendMode = "colorBurn"
	BlendModeHardLight  BlendMode = "hardLight"
	BlendModeSoftLight  BlendMode = "softLight"
	BlendModeDifference BlendMode = "difference"
	BlendModeSaturation BlendMode = "saturation"
	BlendModeLuminosity BlendMode = "luminosity"
	BlendModeColorDodge BlendMode = "colorDodge"
)

func (BlendMode) Value

func (m BlendMode) Value() gopdf.BlendModeType

type Color

type Color struct {
	Red   uint8 `toml:"red" json:"red"`
	Green uint8 `toml:"green" json:"green"`
	Blue  uint8 `toml:"blue" json:"blue"`
}

type Image

type Image struct {
	Path     string    `toml:"path" json:"path"`
	Position Point     `toml:"position" json:"position"`
	Size     Rect      `toml:"size" json:"size"`
	Rotation *Rotation `toml:"rotation" json:"rotation"`
	Link     string    `toml:"link" json:"link"`
}

func (*Image) GetCenter

func (i *Image) GetCenter() *Point

func (*Image) Render

func (i *Image) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

type Import

type Import struct {
	File     string         `toml:"file" json:"file"`
	Page     int            `toml:"page" json:"page"`
	Position *Point         `toml:"position" json:"position"`
	Size     sizes.PageSize `toml:"size" json:"size"`
}

func (*Import) Render

func (i *Import) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

type Item

type Item interface {
	Render(gopdfiface.GoPDFer, *types.FileStores, *types.ModelData) error
}

type Line

type Line struct {
	Width    float64   `toml:"width" json:"width"`
	Type     LineType  `toml:"type" json:"type"`
	Start    Point     `toml:"start" json:"start"`
	End      Point     `toml:"end" json:"end"`
	Rotation *Rotation `toml:"rotation,omitempty" json:"rotation,omitempty"`
	Link     string    `toml:"link" json:"link"`
}

func (*Line) GetCenter

func (i *Line) GetCenter() *Point

func (*Line) Render

func (i *Line) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

type LineType

type LineType string
const (
	LineTypeSolid  LineType = "solid"
	LineTypeDashed LineType = "dashed"
	LineTypeDotted LineType = "dotted"
)
type Link struct {
	Address  string `toml:"address" json:"address"`
	Position Point  `toml:"position" json:"position"`
	Size     Rect   `toml:"size" json:"size"`
}

func (*Link) Render

func (i *Link) Render(pdf gopdfiface.GoPDFer, _ *types.FileStores, modelData *types.ModelData) error

type Oval

type Oval struct {
	LineWidth float64   `toml:"lineWidth" json:"lineWidth"`
	LineType  LineType  `toml:"lineType" json:"lineType"`
	Position  Point     `toml:"position" json:"position"`
	Size      Rect      `toml:"size" json:"size"`
	Rotation  *Rotation `toml:"rotation,omitempty" json:"rotation,omitempty"`
	Link      string    `toml:"link" json:"link"`
}

func (*Oval) GetCenter

func (i *Oval) GetCenter() *Point

func (*Oval) Render

func (i *Oval) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

type Point

type Point struct {
	X float64 `toml:"x" json:"x"`
	Y float64 `toml:"y" json:"y"`
}

type Polygon

type Polygon struct {
	LineWidth   float64      `toml:"lineWidth" json:"lineWidth"`
	LineType    LineType     `toml:"lineType" json:"lineType"`
	StrokeColor Color        `toml:"strokeColor" json:"strokeColor"`
	FillColor   Color        `toml:"fillColor" json:"fillColor"`
	Style       PolygonStyle `toml:"style" json:"style"`
	Points      []Point      `toml:"points" json:"points"`
	Rotation    *Rotation    `toml:"rotation,omitempty" json:"rotation,omitempty"`
}

func (*Polygon) GetCenter

func (i *Polygon) GetCenter() *Point

func (*Polygon) Render

func (i *Polygon) Render(pdf gopdfiface.GoPDFer, _ *types.FileStores, _ *types.ModelData) error

type PolygonStyle

type PolygonStyle string
const (
	PolygonStyleDraw        PolygonStyle = "D"
	PolygonStyleFill        PolygonStyle = "F"
	PolygonStyleDrawAndFill PolygonStyle = "DF"
)

type Rect

type Rect struct {
	Width  float64 `toml:"width" json:"width"`
	Height float64 `toml:"height" json:"height"`
}

type Rectangle

type Rectangle struct {
	LineWidth   float64      `toml:"lineWidth" json:"lineWidth"`
	LineType    LineType     `toml:"lineType" json:"lineType"`
	Position    Point        `toml:"position" json:"position"`
	Size        Rect         `toml:"size" json:"size"`
	StrokeColor Color        `toml:"strokeColor" json:"strokeColor"`
	FillColor   Color        `toml:"fillColor" json:"fillColor"`
	Style       PolygonStyle `toml:"style" json:"style"`
	Rotation    *Rotation    `toml:"rotation,omitempty" json:"rotation,omitempty"`
	Link        string       `toml:"link" json:"link"`
}

func (*Rectangle) Render

func (i *Rectangle) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

type Rotation

type Rotation struct {
	Angle  float64 `toml:"angle" json:"angle"`
	Center *Point  `toml:"center" json:"center"`
}

type Text

type Text struct {
	Family   string    `toml:"family" json:"family"`
	Style    string    `toml:"style" json:"style"`
	Size     int       `toml:"size" json:"size"`
	Position Point     `toml:"position" json:"position"`
	Content  string    `toml:"content" json:"content"`
	Rotation *Rotation `toml:"rotation,omitempty" json:"rotation,omitempty"`
	Link     string    `toml:"link,omitempty" json:"link,omitempty"`
}

func (*Text) GetCenter

func (i *Text) GetCenter(width float64) *Point

func (*Text) Render

func (i *Text) Render(pdf gopdfiface.GoPDFer, fileStores *types.FileStores, modelData *types.ModelData) error

Jump to

Keyboard shortcuts

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