utils

package
v0.0.0-...-6b508d1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CursorPosition

func CursorPosition() image.Point

Returns the current cursor position as a Point.

func NewDrawOptions

func NewDrawOptions(dest, src image.Rectangle) *colorm.DrawImageOptions

Creates a new DrawImageOptions that scales the source image to fit the destination rectangle.

func ScaleRatio

func ScaleRatio(a image.Rectangle, b image.Rectangle) (float64, float64)

Returns the ratio of the width and height of two rectangles.

func ScaleRectangle

func ScaleRectangle(rect image.Rectangle, x, y float64) image.Rectangle

Scales a rectangle by a given ratio pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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