Documentation ¶
Overview ¶
Package image implements a bitmap image type, and a binary color type
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BinaryColorModel color.Model = color.ModelFunc(toBinaryColor)
The ColorModel associated with BinaryColor.
Functions ¶
This section is empty.
Types ¶
type BinaryColor ¶
type BinaryColor struct {
Black bool
}
A BinaryColor represents either black or white.
func (BinaryColor) RGBA ¶
func (c BinaryColor) RGBA() (r, g, b, a uint32)
type Bitmap ¶
type Bitmap struct { // Pix holds the image's pixels. The pixel at (x, y) is Pix[y*Stride + x/8] >> (7 - x&7) & 1. Pix []uint8 Stride int // Rect is the image's bounds. Rect i.Rectangle }
A Bitmap is an in-memory image of BinaryColor values.
func (*Bitmap) ColorModel ¶
func (*Bitmap) Opaque ¶
Opaque scans the entire image and returns whether or not it is fully opaque.
func (*Bitmap) SetBinary ¶
func (p *Bitmap) SetBinary(x, y int, c BinaryColor)
Click to show internal directories.
Click to hide internal directories.