Documentation ¶
Index ¶
- Variables
- type Color
- type Image
- func (p *Image) At(x, y int) color.Color
- func (p *Image) Bounds() image.Rectangle
- func (p *Image) ColorModel() color.Model
- func (p *Image) Opaque() bool
- func (p *Image) PixOffset(x, y int) int
- func (p *Image) RGBA4444At(x, y int) Color
- func (p *Image) Set(x, y int, c color.Color)
- func (p *Image) SetRGBA4444(x, y int, c Color)
- func (p *Image) SubImage(r image.Rectangle) image.Image
Constants ¶
This section is empty.
Variables ¶
View Source
var Model color.Model = color.ModelFunc(rgba4444Model)
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct {
R, G, B, A uint8
}
RGBA represents a traditional 16-bit alpha-premultiplied color, having 4 bits for each of red, green, blue and alpha.
type Image ¶
type Image struct { // (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*2]. Pix []uint8 // Stride is the Pix stride (in bytes) between vertically adjacent pixels. Stride int // Rect is the image's bounds. Rect image.Rectangle }
Image is an in-memory image whose At method returns rgba4444.Color values.
func (*Image) ColorModel ¶
func (*Image) PixOffset ¶
PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).
func (*Image) RGBA4444At ¶
func (*Image) SetRGBA4444 ¶
Click to show internal directories.
Click to hide internal directories.