image

package
v2.0.0-beta.15 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 7 Imported by: 16

Documentation

Overview

Package image implements creation of images from file and bytes.

Package image implements creation of images from file and bytes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromBytes

func NewFromBytes(bytes []byte, extension extension.Type, ps ...props.Rect) core.Component

NewFromBytes is responsible to create an instance of an Image.

func NewFromBytesCol

func NewFromBytesCol(size int, bytes []byte, extension extension.Type, ps ...props.Rect) core.Col

NewFromBytesCol is responsible to create an instance of an Image wrapped in a Col.

func NewFromBytesRow

func NewFromBytesRow(height float64, bytes []byte, extension extension.Type, ps ...props.Rect) core.Row

NewFromBytesRow is responsible to create an instance of an Image wrapped in a Row.

func NewFromFile

func NewFromFile(path string, ps ...props.Rect) core.Component

NewFromFile is responsible to create an instance of an Image.

func NewFromFileCol

func NewFromFileCol(size int, path string, ps ...props.Rect) core.Col

NewFromFileCol is responsible to create an instance of an Image wrapped in a Col.

func NewFromFileRow

func NewFromFileRow(height float64, path string, ps ...props.Rect) core.Row

NewFromFileRow is responsible to create an instance of an Image wrapped in a Row.

Types

type BytesImage

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

func (*BytesImage) GetStructure

func (b *BytesImage) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of an Image.

func (*BytesImage) Render

func (b *BytesImage) Render(provider core.Provider, cell *entity.Cell)

Render renders an Image into a PDF context.

func (*BytesImage) SetConfig

func (b *BytesImage) SetConfig(config *entity.Config)

SetConfig sets the pdf config.

type FileImage

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

func (*FileImage) GetStructure

func (f *FileImage) GetStructure() *node.Node[core.Structure]

GetStructure returns the Structure of an Image.

func (*FileImage) Render

func (f *FileImage) Render(provider core.Provider, cell *entity.Cell)

Render renders an Image into a PDF context.

func (*FileImage) SetConfig

func (f *FileImage) SetConfig(config *entity.Config)

SetConfig sets the pdf config.

Jump to

Keyboard shortcuts

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