skill_star

package module
v0.0.0-...-8f4af5d Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 6 Imported by: 0

README

skill-star

Create custom skill star

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSkillStar

func GenerateSkillStar(cfg SkillsConfig, imageCfg ImageConfig, person Person) image.Image

Types

type ImageConfig

type ImageConfig struct {
	Width    int
	Height   int
	NeedName bool

	BackgroundColor color.RGBA
	TextColor       color.RGBA
	PersonColor     color.RGBA
	StrokeColor     color.RGBA

	Radius int
}

type Mask

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

func (Mask) Draw

func (c Mask) Draw(targetImage *image.RGBA, gc *draw2dimg.GraphicContext, img *image.RGBA, transparency uint8) *image.RGBA

func (Mask) Prepare

func (c Mask) Prepare() (*draw2dimg.GraphicContext, image.RGBA)

type Person

type Person struct {
	Name         string
	SkillsValues []int
}

type SkillsConfig

type SkillsConfig struct {
	Skills []string // Skill's names. (ex: ["Strength", "Stamina", "Health", "Speed"])
	Depth  int      // Maximal available skill value (starting with 0)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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