raster

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPNG

func LoadPNG(path string) (*image.NRGBA, error)

func SavePNG

func SavePNG(img *image.NRGBA, name string) error

Types

type Depth

type Depth struct {
	Pix  []float64
	Rect image.Rectangle
}

func NewDepth

func NewDepth(rect image.Rectangle) *Depth

func (*Depth) At

func (d *Depth) At(x, y int) float64

func (*Depth) Set

func (d *Depth) Set(x, y int, depth float64)

type RenderBuffer

type RenderBuffer struct {
	Color *image.NRGBA
	Depth *Depth
	Dirty bool
}

func NewRenderBuffer

func NewRenderBuffer(rect image.Rectangle) *RenderBuffer

func (*RenderBuffer) OverlayDepthAware

func (target *RenderBuffer) OverlayDepthAware(source *RenderBuffer, origin image.Point, depthOffset float64)

func (*RenderBuffer) OverlayDepthAwareWithAlpha

func (target *RenderBuffer) OverlayDepthAwareWithAlpha(source *RenderBuffer, origin image.Point, depthOffset float64)

Jump to

Keyboard shortcuts

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