Documentation
¶
Index ¶
- Variables
- type ColorRGB565
- type DPF
- type ImageRGB565
- func (p ImageRGB565) At(x, y int) color.Color
- func (p ImageRGB565) Bounds() image.Rectangle
- func (p ImageRGB565) ColorModel() color.Model
- func (p *ImageRGB565) Opaque() bool
- func (p *ImageRGB565) PixOffset(x, y int) int
- func (p *ImageRGB565) PixRect() []byte
- func (p *ImageRGB565) RGB565At(x, y int) ColorRGB565
- func (p *ImageRGB565) Set(x, y int, c color.Color)
- func (p *ImageRGB565) SetRGB565(x, y int, c ColorRGB565)
- func (p *ImageRGB565) SubImage(r image.Rectangle) image.Image
Constants ¶
This section is empty.
Variables ¶
View Source
var RGB565Model color.Model = color.ModelFunc(rgb565Model)
Functions ¶
This section is empty.
Types ¶
type ColorRGB565 ¶
type ColorRGB565 struct {
C uint16
}
ColorRGB565 represents a 16-bit 565 color.
func (ColorRGB565) RGBA ¶
func (c ColorRGB565) RGBA() (r, g, b, a uint32)
type DPF ¶
func (*DPF) Blit ¶
func (dpf *DPF) Blit(img *ImageRGB565) error
func (*DPF) Brightness ¶
func (*DPF) GetDimensions ¶
type ImageRGB565 ¶
type ImageRGB565 struct { // Pix holds the image's pixels, as alpha values in big-endian format. The pixel at // (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 }
RGB565 is an in-memory image whose At method returns ColorRGB565 values.
func NewRGB565 ¶
func NewRGB565(r image.Rectangle) *ImageRGB565
NewRGB565 returns a new RGB565 image with the given bounds.
func NewRGB565Image ¶
func NewRGB565Image(src image.Image) *ImageRGB565
NewRGB565 returns RGB565 copy of image
func (ImageRGB565) Bounds ¶
func (p ImageRGB565) Bounds() image.Rectangle
func (ImageRGB565) ColorModel ¶
func (p ImageRGB565) ColorModel() color.Model
func (*ImageRGB565) Opaque ¶
func (p *ImageRGB565) Opaque() bool
Opaque scans the entire image and reports whether it is fully opaque.
func (*ImageRGB565) PixOffset ¶
func (p *ImageRGB565) PixOffset(x, y int) int
PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).
func (*ImageRGB565) PixRect ¶
func (p *ImageRGB565) PixRect() []byte
func (*ImageRGB565) RGB565At ¶
func (p *ImageRGB565) RGB565At(x, y int) ColorRGB565
func (*ImageRGB565) SetRGB565 ¶
func (p *ImageRGB565) SetRGB565(x, y int, c ColorRGB565)
Click to show internal directories.
Click to hide internal directories.