labelimage

package
v0.0.0-...-d2579fa Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(size image.Rectangle, textColor color.RGBA, text string, border bool, shadow bool) *image.RGBA

func CreateWithFont

func CreateWithFont(size image.Rectangle, fontFace *truetype.Font, textColor color.RGBA, text []string, border bool, shadow bool) *image.RGBA

func Crosshair

func Crosshair(img *image.RGBA)

func DrawBorder

func DrawBorder(img *image.RGBA, borderWidth int, col color.RGBA)

func DrawText

func DrawText(c *freetype.Context, x int, y int, text string) error

DrawText draws the given text in the given context, at the given location

func PrepareFreetypeContext

func PrepareFreetypeContext(dst *image.RGBA, src image.Image, font FontDescription) (*freetype.Context, int)

PrepareFreetypeContext sets up all the bits and bobs related to drawing text on the image

Types

type FontDescription

type FontDescription struct {
	Font    *truetype.Font
	DPI     float64
	Hinting font.Hinting
	Size    float64
	Ratio   float64
}

Jump to

Keyboard shortcuts

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