fp16

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NRGBAh

type NRGBAh struct {
	// Pix holds the image's pixels, in R, G, B, A order and big-endian format. The pixel at
	// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*8].
	Pix []uint8

	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int

	// Rect is the image's bounds.
	Rect image.Rectangle
}

NRGBA64 is an in-memory image whose At method returns fp16color.NRGBAh values.

func NewNRGBAh

func NewNRGBAh(r image.Rectangle) *NRGBAh

NewNRGBh returns a new NRGBA64 image with the given bounds.

func (*NRGBAh) At

func (p *NRGBAh) At(x, y int) color.Color

func (*NRGBAh) Bounds

func (p *NRGBAh) Bounds() image.Rectangle

func (*NRGBAh) ColorModel

func (p *NRGBAh) ColorModel() color.Model

func (*NRGBAh) NRGBAhAt

func (p *NRGBAh) NRGBAhAt(x, y int) fp16color.NRGBAh

func (*NRGBAh) PixOffset

func (p *NRGBAh) PixOffset(x, y int) int

PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).

func (NRGBAh) SetNRGBAh

func (p NRGBAh) SetNRGBAh(x, y int, c fp16color.NRGBAh)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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