cursorimg

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package cursorimg provides the cached rendering of SVG cursors to images.

Index

Constants

This section is empty.

Variables

View Source
var Cursors = map[enums.Enum]map[int]*Cursor{}

Cursors contains all of the cached rendered cursors, specified first by cursor enum and then by size.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	// The cached image of the cursor.
	Image image.Image
	// The size of the cursor.
	Size int
	// The hotspot is expressed in terms of raw cursor pixels.
	Hotspot image.Point
}

Cursor represents a cached rendered cursor, with the image.Image of the cursor and its hotspot.

func Get

func Get(cursor enums.Enum, size int) (*Cursor, error)

Get returns the cursor object corresponding to the given cursor enum, with the given size. If it is not already cached in Cursors, it renders and caches it.

Jump to

Keyboard shortcuts

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