affine

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package to handle 2D affine transformations, following GDAL affine convention

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Affine

type Affine [6]float64

Affine follows the GDAL transform convention

func NewAffine

func NewAffine(a, b, c, d, e, f float64) *Affine

func Scale

func Scale(scalex, scaley float64) *Affine

Scale creates a scale transform from (scalex, scaley)

func Translation

func Translation(offx, offy float64) *Affine

Translation creates a translation transform from (offx, offy)

func (*Affine) Inverse

func (a *Affine) Inverse() *Affine

Inverse creates the inverse of the affine transform. Inverse panics if it is not inversible

func (*Affine) IsInvertible

func (a *Affine) IsInvertible() bool

IsInvertible returns true if the transformation is invertible

func (*Affine) Multiply

func (a *Affine) Multiply(b *Affine) *Affine

Multiply merges the two affines transforms into one.

func (*Affine) Rx

func (a *Affine) Rx() float64

Rx returns the X resolution

func (*Affine) Ry

func (a *Affine) Ry() float64

Ry returns the Y resolution

func (*Affine) Transform

func (a *Affine) Transform(x float64, y float64) (float64, float64)

Transform applies the affine transform to the point (x, y)

Jump to

Keyboard shortcuts

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