gioassets

package module
v0.0.0-...-0e1f1a5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

README

GIOASSETS

It's simple package to load all images, vectors and fonts from embed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImages

func NewImages(embed fs.FS) map[string]paint.ImageOp

NewImages returns a list of `paint.ImageOp`. It expects the image to be WEBP, and the name of the file must be unique, even if the file is storage on distinct folders.

The name of the file doesn't contain the extension.

func NewSharper

func NewSharper(embed fs.FS) text.Shaper

NewSharper creates a text.Shaper. It can be re-used across all widget.Label or widget.Editor.

The name of the file must be `{name}_{weight}[_{style}]`, for instance it can be Montserrat-700.ttf or Montserrat-700-Italic.ttf.

func NewVectors

func NewVectors(embed fs.FS) map[string]*giosvg.IconOp

NewVectors returns a list of `*giosvg.IconOp`. It expects the image to be SVG, and the name of the file must be unique, even if the file is storage on distinct folders.

The name of the file doesn't contain the extension.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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