scale

package
v2.4.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToFyneCoordinate

func ToFyneCoordinate(c fyne.Canvas, v int) float32

ToFyneCoordinate converts a screen coordinate for a given canvas to a fyne coordinate

func ToFyneSize

func ToFyneSize(obj fyne.CanvasObject, width, height int) fyne.Size

ToFyneSize returns the scaled size of an object based on pixel coordinates, typically for images. This method will attempt to find the canvas for an object to get its scale. In the event that this fails it will assume a 1:1 mapping (scale=1 or low DPI display).

func ToScreenCoordinate

func ToScreenCoordinate(c fyne.Canvas, v float32) int

ToScreenCoordinate converts a fyne coordinate in the given canvas to a screen coordinate

Types

This section is empty.

Jump to

Keyboard shortcuts

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