convertutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFontSize     = 12.0
	DefaultImageEncoder _bac.StreamEncoder
	DefaultPageSize     = PageSizeA4
)
View Source
var RtlFontFile *_aeg.PdfFont
View Source
var StdFontsMap = map[string][]string{"\u0048e\u006c\u0076\u0065\u0074\u0069\u0063a": []string{"\u0048e\u006c\u0076\u0065\u0074\u0069\u0063a", "\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061-\u0042\u006f\u006c\u0064", "\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061\u002d\u004f\u0062l\u0069\u0071\u0075\u0065", "H\u0065\u006c\u0076\u0065ti\u0063a\u002d\u0042\u006f\u006c\u0064O\u0062\u006c\u0069\u0071\u0075\u0065"}, "\u0043o\u0075\u0072\u0069\u0065\u0072": []string{"\u0043o\u0075\u0072\u0069\u0065\u0072", "\u0043\u006f\u0075r\u0069\u0065\u0072\u002d\u0042\u006f\u006c\u0064", "\u0043o\u0075r\u0069\u0065\u0072\u002d\u004f\u0062\u006c\u0069\u0071\u0075\u0065", "\u0043\u006f\u0075\u0072ie\u0072\u002d\u0042\u006f\u006c\u0064\u004f\u0062\u006c\u0069\u0071\u0075\u0065"}, "\u0054i\u006de\u0073\u0020\u004e\u0065\u0077\u0020\u0052\u006f\u006d\u0061\u006e": []string{"T\u0069\u006d\u0065\u0073\u002d\u0052\u006f\u006d\u0061\u006e", "\u0054\u0069\u006d\u0065\u0073\u002d\u0042\u006f\u006c\u0064", "\u0054\u0069\u006de\u0073\u002d\u0049\u0074\u0061\u006c\u0069\u0063", "\u0054\u0069m\u0065\u0073\u002dB\u006f\u006c\u0064\u0049\u0074\u0061\u006c\u0069\u0063"}, "\u0064e\u0066\u0061\u0075\u006c\u0074": []string{"\u0048e\u006c\u0076\u0065\u0074\u0069\u0063a", "\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061-\u0042\u006f\u006c\u0064", "\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061\u002d\u004f\u0062l\u0069\u0071\u0075\u0065", "H\u0065\u006c\u0076\u0065ti\u0063a\u002d\u0042\u006f\u006c\u0064O\u0062\u006c\u0069\u0071\u0075\u0065"}}

Functions

func AdjustColor

func AdjustColor(colorStr string, EG_ColorTransform []*_fac.EG_ColorTransform) string

func AdjustColorByLumMod

func AdjustColorByLumMod(colorStr string, lum float64) string

func AdjustColorByLumOff

func AdjustColorByLumOff(colorStr string, lumOff float64) string

func AdjustColorByShade

func AdjustColorByShade(colorStr string, shade float64) string

func AdjustColorByTint

func AdjustColorByTint(colorStr string, tint float64) string

func AssignStdFontByName

func AssignStdFontByName(style _ed.TextStyle, fontName string) *_aeg.PdfFont

func ClearRegisteredFonts

func ClearRegisteredFonts()

func CropImageByRect

func CropImageByRect(sourceImg _ae.Image, rect _ae.Rectangle) _ae.Image

func DrawLine

func DrawLine(c *_ed.Creator, x0, y0, x1, y1, width float64, color _ed.Color)

func DrawRectangle

func DrawRectangle(c *_ed.Creator, r *Rectangle, w float64, color _ed.Color)

func FillRectangle

func FillRectangle(c *_ed.Creator, x, y, width, height float64, color _ed.Color)

func FromSTCoordinate

func FromSTCoordinate(st _fac.ST_Coordinate) int64

func FromSTCoordinate32

func FromSTCoordinate32(st _fac.ST_Coordinate32) int64

func FromSTPercentage

func FromSTPercentage(st *_fac.ST_Percentage) float64

func GetColorStringFromDmlColor

func GetColorStringFromDmlColor(dmlColor *_fac.CT_Color) string

func GetDataFromXfrm

func GetDataFromXfrm(xfrm *_fac.CT_Transform2D) (float64, float64, float64, float64)

func GetDefaultPageSize

func GetDefaultPageSize() _ed.PageSize

func GetGroupOffsetFromXfrm

func GetGroupOffsetFromXfrm(xfrm *_fac.CT_GroupTransform2D) (float64, float64)

func GetImage

func GetImage(c *_ed.Creator, goImg _ae.Image, imgHeight, imgWidth, left, top, dividerX, dividerY float64, part ImgPart) (*_ed.Image, error)

func GetOpacityFromColorTransform

func GetOpacityFromColorTransform(trs []*_fac.EG_ColorTransform) float64

func GetPageDimensions

func GetPageDimensions(size PageSize) _ed.PageSize

func GetPageFromCreator

func GetPageFromCreator(c *_ed.Creator) (*_aeg.PdfPage, error)

func GetRegisteredFont

func GetRegisteredFont(name string, style FontStyle) *_aeg.PdfFont

func IsNoSpaceLanguage

func IsNoSpaceLanguage(symbol string) bool

func Lighten

func Lighten(clr float64) float64

func LoadFontFromFile

func LoadFontFromFile(filename string) (*_aeg.PdfFont, error)

func MakeBlockFromChartSpace

func MakeBlockFromChartSpace(cs *_fb.ChartSpace, width, height float64, theme *_fac.Theme) (*_ed.Block, error)

func MakeBlockFromCreator

func MakeBlockFromCreator(c *_ed.Creator) (*_ed.Block, error)

func MakeImageFromChartSpace

func MakeImageFromChartSpace(cs *_fb.ChartSpace, width, height float64, theme *_fac.Theme, workbook *_ab.Workbook) (_ae.Image, error)

func MakeTempCreator

func MakeTempCreator(width, height float64) *_ed.Creator

func MakeTempCreatorMaxHeight

func MakeTempCreatorMaxHeight(width float64) *_ed.Creator

func PointsFromTwips

func PointsFromTwips(twips int64) float64

func RegisterEmbeddedFonts

func RegisterEmbeddedFonts(d *_dd.Document) error

func RegisterFont

func RegisterFont(name string, style FontStyle, font *_aeg.PdfFont)

func RegisterFontsFromDirectory

func RegisterFontsFromDirectory(dirName string) error

func RegisterFontsFromFiles

func RegisterFontsFromFiles(files []string) error

func TwipsFromPoints

func TwipsFromPoints(points float64) float64

Types

type BorderPosition

type BorderPosition byte
const (
	BorderPositionTop    BorderPosition = 0
	BorderPositionLeft   BorderPosition = 1
	BorderPositionBottom BorderPosition = 2
	BorderPositionRight  BorderPosition = 3
)

type FontStyle

type FontStyle byte
const (
	FontStyle_Regular    FontStyle = 0
	FontStyle_Bold       FontStyle = 1
	FontStyle_Italic     FontStyle = 2
	FontStyle_BoldItalic FontStyle = 3
)

func (FontStyle) String

func (_fdeg FontStyle) String() string

type ImgPart

type ImgPart byte
const (
	ImgPart_whole ImgPart = 0
	ImgPart_t     ImgPart = 1
	ImgPart_b     ImgPart = 2
	ImgPart_l     ImgPart = 3
	ImgPart_r     ImgPart = 4
	ImgPart_lt    ImgPart = 5
	ImgPart_rt    ImgPart = 6
	ImgPart_lb    ImgPart = 7
	ImgPart_rb    ImgPart = 8
)

type PageSize

type PageSize int
const (
	PageSizeA4 PageSize = iota
	PageSizeA3
	PageSizeA5
	PageSizeLetter
	PageSizeLegal
	Percent100    = 100000.0
	MaxPageHeight = 11906
)

type Rectangle

type Rectangle struct {
	Top    float64
	Bottom float64
	Left   float64
	Right  float64
}

func (*Rectangle) Translate

func (_dbcgb *Rectangle) Translate(x, y float64)

Jump to

Keyboard shortcuts

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