geometry

package
v0.0.0-...-2422fc7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 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 Dimensions

type Dimensions struct {
	// contains filtered or unexported fields
}

func NewDimensions

func NewDimensions(width, height int) (d Dimensions)

func (*Dimensions) GetAspectRatio

func (d *Dimensions) GetAspectRatio() float64

func (*Dimensions) GetHeight

func (d *Dimensions) GetHeight() int

func (*Dimensions) GetWidth

func (d *Dimensions) GetWidth() int

func (*Dimensions) WithRescaling

func (d *Dimensions) WithRescaling(newScale *float64, roundingFunc *string) (nd Dimensions, err error)

func (*Dimensions) WithSwappedAxes

func (d *Dimensions) WithSwappedAxes() (nd Dimensions)

type Rectangle

type Rectangle struct {
	// contains filtered or unexported fields
}

func NewRectangle

func NewRectangle(x, y, width, height int) (r Rectangle)

func (*Rectangle) GetAspectRatio

func (r *Rectangle) GetAspectRatio() float64

func (*Rectangle) GetHeight

func (r *Rectangle) GetHeight() int

func (*Rectangle) GetWidth

func (r *Rectangle) GetWidth() int

func (*Rectangle) GetX

func (r *Rectangle) GetX() int

func (*Rectangle) GetX1

func (r *Rectangle) GetX1() int

func (*Rectangle) GetX2

func (r *Rectangle) GetX2() int

func (*Rectangle) GetY

func (r *Rectangle) GetY() int

func (*Rectangle) GetY1

func (r *Rectangle) GetY1() int

func (*Rectangle) GetY2

func (r *Rectangle) GetY2() int

func (*Rectangle) WithRescaling

func (r *Rectangle) WithRescaling(newScale *float64, roundingFunc *string) (nr *Rectangle, err error)

func (*Rectangle) WithSwappedAxes

func (r *Rectangle) WithSwappedAxes() (nr Rectangle)

Jump to

Keyboard shortcuts

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