viewport

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Origin(0, 0, 1, 1)

Functions

This section is empty.

Types

type Viewport

type Viewport struct{ Prescale, Postscale matrix.Matrix }

Viewport

func Center

func Center(offsetX, offsetY, width, height float64) Viewport

Center creates a viewport where the scene's origin is centered in the view

func Origin

func Origin(offsetX, offsetY, width, height float64) Viewport

Origin creates a view port where the scene's origin is aligned with the origin ([0, 0]) of the view origin, which usually is at the top left.

Jump to

Keyboard shortcuts

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