Documentation ¶
Index ¶
- Constants
- Variables
- func AsyncFetch(url string, img *gtk.Image, w, h int, pp ...Processor)
- func AsyncFetchUnsafe(url string, img *gtk.Image, w, h int, pp ...Processor)
- func GetPixbuf(url string, pp ...Processor) (*gdk.Pixbuf, error)
- func GetPixbufScaled(url string, w, h int, pp ...Processor) (*gdk.Pixbuf, error)
- func MaxSize(w, h, maxW, maxH int) (int, int)
- func ProcessAnimationStream(r io.Reader, processors []Processor) ([]byte, error)
- func ProcessStream(r io.Reader, processors []Processor) ([]byte, error)
- func Round(img image.Image) image.Image
- func SanitizeString(str string) string
- func SetImage(url string, img *gtk.Image, pp ...Processor) error
- func SetImageAsync(url string, img *gtk.Image, w, h int) error
- func SetImageScaled(url string, img *gtk.Image, w, h int, pp ...Processor) error
- func SetImageScaledContext(ctx context.Context, url string, img *gtk.Image, w, h int, pp ...Processor) error
- func SizeToURL(url string, w, h int) string
- func TransformURL(s string) string
- type Processor
Constants ¶
View Source
const ( CacheHash = "hackadoll3" CachePrefix = "gtkcord3" )
DO NOT TOUCH.
Variables ¶
View Source
var ( DirName = CachePrefix + "-" + CacheHash Temp = os.TempDir() Path = filepath.Join(Temp, DirName) )
View Source
var Client = http.Client{ Timeout: 15 * time.Second, }
Functions ¶
func AsyncFetchUnsafe ¶
func GetPixbufScaled ¶
func ProcessAnimationStream ¶
func SanitizeString ¶
SanitizeString makes the string friendly to put into the file system. It converts anything that isn't a digit or letter into underscores.
func SetImageAsync ¶
SetImageAsync is not cached.
func SetImageScaled ¶
func SetImageScaledContext ¶
func TransformURL ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.