Documentation ¶
Overview ¶
Package hsvimage implements the image.Image interface with HSV + alpha images. The code was largely adapted from code in the Go standard library.
Index ¶
- type NHSVA
- func (p *NHSVA) At(x, y int) color.Color
- func (p *NHSVA) Bounds() image.Rectangle
- func (p *NHSVA) ColorModel() color.Model
- func (p *NHSVA) NHSVAAt(x, y int) hsvcolor.NHSVA
- func (p *NHSVA) Opaque() bool
- func (p *NHSVA) PixOffset(x, y int) int
- func (p *NHSVA) Set(x, y int, c color.Color)
- func (p *NHSVA) SetNHSVA(x, y int, c hsvcolor.NHSVA)
- func (p *NHSVA) SubImage(r image.Rectangle) image.Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NHSVA ¶
type NHSVA struct { // Pix holds the image's pixels, in H, S, V, A order. The pixel at // (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4]. Pix []uint8 // Stride is the Pix stride (in bytes) between vertically adjacent pixels. Stride int // Rect is the image's bounds. Rect image.Rectangle }
NHSVA is an in-memory image whose At method returns hsvcolor.NHSVA values.
func (*NHSVA) ColorModel ¶
ColorModel states that an NHSVA image uses the hsvcolor.NHSVA color model.
func (*NHSVA) NHSVAAt ¶
NHSVAAt returns the color at the given image coordinates as specifically an hsvcolor.NHSVA color.
func (*NHSVA) PixOffset ¶
PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).
Click to show internal directories.
Click to hide internal directories.