Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ARGB8888 formatARGB8888 XRGB8888 formatXRGB8888 )
Various predefined Formats.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct {
Format Format
// Data contains the pixel data for the color. Only some bytes of
// the array are used, dependant on the return value of Format.Size.
Data [8]byte
}
Color implements color.Color using a Format.
type Format ¶
type Format interface {
// Size returns the number of bytes per pixel.
Size() int
// Read reads raw pixel data and converts it to alpha-premultiplied
// RGBA values, similar to color.Color's RGBA method.
Read([]byte) (r, g, b, a uint32)
// Write writes alpha-premultiplied RGBA values into buf.
Write(buf []byte, r, g, b, a uint32)
}
Format is a pixel format for a FormatImage and related types. This package contains several predefined formats, such as ARGB8888.
Click to show internal directories.
Click to hide internal directories.