cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client = http.Client{
	Timeout: 15 * time.Second,
}

Functions

func MaxSize

func MaxSize(w, h, maxW, maxH int) (int, int)

func SetImageStreamed added in v0.1.0

func SetImageStreamed(img Imager, url string, w, h int)

SetImageStreamed is async and not cached.

func SetImageStreamedContext added in v0.1.0

func SetImageStreamedContext(ctx context.Context, img Imager, url string, w, h int)

SetImageStreamedContext is the ctx variant of SetImageStreamed.

func SetImageURL added in v0.1.0

func SetImageURL(img Imager, url string)

func SetImageURLScaled added in v0.1.0

func SetImageURLScaled(img Imager, url string, w, h int)

func SetImageURLScaledContext added in v0.1.0

func SetImageURLScaledContext(ctx context.Context, img Imager, url string, w, h int)

func SizeToURL

func SizeToURL(urlstr string, w, h int) string

func TmpPath added in v0.1.0

func TmpPath() string

TmpPath returns the temporary path.

Types

type Imager added in v0.1.0

type Imager interface {
	gtk.Widgetter
	ScaleFactor() int
	SetFromIconName(string, int)
	SetFromPixbuf(*gdkpixbuf.Pixbuf)
	SetFromAnimation(*gdkpixbuf.PixbufAnimation)
	SetFromSurface(*cairo.Surface)
}

Imager describes the image type.

Jump to

Keyboard shortcuts

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