viewfinder

package
v0.0.0-...-dd13743 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ViewFinder

type ViewFinder struct {
	Offset pixel.Vec
	Scale  float64
}

ViewFinder allows the user to zoom or move the view on the field

func (ViewFinder) RealToViewFinder

func (vf ViewFinder) RealToViewFinder(input vect.Vect) (output pixel.Vec)

RealToViewFinder converts a set of real coordinates to coordinates on the screen

func (*ViewFinder) Reset

func (vf *ViewFinder) Reset()

Reset resets the viewfinder settings

func (*ViewFinder) SetOffset

func (vf *ViewFinder) SetOffset(offset pixel.Vec)

SetOffset sets an offset for viewing the field

func (*ViewFinder) SetScale

func (vf *ViewFinder) SetScale(scale float64)

SetScale zooms in or out of the field

func (ViewFinder) ViewFinderToReal

func (vf ViewFinder) ViewFinderToReal(input pixel.Vec) (output vect.Vect)

ViewFinderToReal converts a set of coordinates on the screen to real coordinates

Jump to

Keyboard shortcuts

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