picture

package
v0.0.0-...-119b68f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Picture

type Picture struct {
	R [][]float32
	G [][]float32
	B [][]float32
	A [][]float32
	// contains filtered or unexported fields
}

func NewPicture

func NewPicture(width, height int) (p *Picture)

func NewPictureFromImage

func NewPictureFromImage(img image.Image) (p *Picture)

func (*Picture) ConvertToImageRGBA8

func (p *Picture) ConvertToImageRGBA8() (img *image.RGBA)

func (*Picture) GetHeight

func (p *Picture) GetHeight() (x int)

func (*Picture) GetPixel

func (p *Picture) GetPixel(x, y int) (pixel Pixel, err error)

func (*Picture) GetPixelUnsafe

func (p *Picture) GetPixelUnsafe(x, y int) (pixel Pixel)

func (*Picture) GetWidth

func (p *Picture) GetWidth() (x int)

func (*Picture) SetPixel

func (p *Picture) SetPixel(x, y int, pixel Pixel) (err error)

type Pixel

type Pixel struct {
	R, G, B, A float32
}

func NewPixel

func NewPixel(r, g, b, a float32) (pix Pixel)

func (Pixel) GetValues

func (p Pixel) GetValues() (r, g, b, a float32)

Jump to

Keyboard shortcuts

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