Documentation ¶
Overview ¶
Package image16bit implements 16 bit (5, 6, 7 bits per color) 2D graphics.
It is compatible with package image/draw.
Index ¶
- Constants
- Variables
- type Bits
- type VerticalLSB
- func (i *VerticalLSB) At(x, y int) color.Color
- func (i *VerticalLSB) BitsAt(x, y int) Bits
- func (i *VerticalLSB) Bounds() image.Rectangle
- func (i *VerticalLSB) ColorModel() color.Model
- func (i *VerticalLSB) Opaque() bool
- func (i *VerticalLSB) PixOffset(x, y int) int
- func (i *VerticalLSB) Set(x, y int, c color.Color)
- func (i *VerticalLSB) SetBit(x, y int, b Bits)
Constants ¶
View Source
const ( Black = 0 White = 0xffff )
Variables ¶
View Source
var BitsModel = color.ModelFunc(convert)
Functions ¶
This section is empty.
Types ¶
type VerticalLSB ¶
type VerticalLSB struct { // Pix holds the image's pixels, as vertically LSB-first packed bitmap. It // can be passed directly to ssd1351.Dev.Write() Pix []byte Stride int // Rect is the image's bounds. Rect image.Rectangle }
VerticalLSB is a 16 bit RGB image.
Each 2 bytes represent a single pixel ¶
It is designed specifically to work with SSD1351 OLED display controller.
func NewVerticalLSB ¶
func NewVerticalLSB(r image.Rectangle) *VerticalLSB
NewVerticalLSB returns an initialized VerticalLSB instance.
func (*VerticalLSB) BitsAt ¶
func (i *VerticalLSB) BitsAt(x, y int) Bits
BitAt is the optimized version of At().
func (*VerticalLSB) Bounds ¶
func (i *VerticalLSB) Bounds() image.Rectangle
Bounds implements image.Image.
func (*VerticalLSB) ColorModel ¶
func (i *VerticalLSB) ColorModel() color.Model
ColorModel implements image.Image.
func (*VerticalLSB) Opaque ¶
func (i *VerticalLSB) Opaque() bool
Opaque scans the entire image and reports whether it is fully opaque.
func (*VerticalLSB) PixOffset ¶
func (i *VerticalLSB) PixOffset(x, y int) int
func (*VerticalLSB) Set ¶
func (i *VerticalLSB) Set(x, y int, c color.Color)
Set implements draw.Image
func (*VerticalLSB) SetBit ¶
func (i *VerticalLSB) SetBit(x, y int, b Bits)
SetBit is the optimized version of Set().
Click to show internal directories.
Click to hide internal directories.