hsutil

package
v0.0.0-...-667d129 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package hsutil holds utility and helper functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToInt

func BoolToInt(b bool) int32

BoolToInt converts bool into 32-bit integer if b is true, then returns 1, else 0

func Color

func Color(rgba uint32) color.RGBA

Color converts an rgba uint32 to a colorEnabled.RGBA

func CreateFileAtPath

func CreateFileAtPath(pathToFile string, data []byte) bool

CreateFileAtPath creates file at path

func ExportToGif

func ExportToGif(images []*image.RGBA, delay int32) error

ExportToGif converts images area to GIF format and saves it under the path selected by user tutorial: http://tech.nitoyon.com/en/blog/2016/01/07/go-animated-gif-gen/

func Hex2RGB

func Hex2RGB(hex string) (r, g, b uint8, err error)

Hex2RGB converts haxadecimal string color into r, g, b

func RGB2Hex

func RGB2Hex(red, green, blue uint8) string

RGB2Hex converts RGB color into hexadecimal string

func SplitIntoLinesWithMaxWidth

func SplitIntoLinesWithMaxWidth(fullSentence string, maxChars int) []string

SplitIntoLinesWithMaxWidth splits the given string into lines considering the given maxChars

func Wrap

func Wrap(x, max int) int

Wrap integer to max: wrap(450, 360) == 90

Types

This section is empty.

Jump to

Keyboard shortcuts

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