Documentation ¶
Index ¶
- type Palette
- type Preview
- type Swatch
- func (s *Swatch) Bounds() image.Rectangle
- func (s *Swatch) Draw(screen *ebiten.Image)
- func (s *Swatch) PreferredSize() (int, int)
- func (s *Swatch) SetPosition(x, y int)
- func (s *Swatch) SetSize(sx, sy int)
- func (s *Swatch) SetVisible(visible bool)
- func (s *Swatch) Swap(color color.Color) (prev color.Color)
- func (s *Swatch) Update() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Palette ¶
type Palette struct {
// contains filtered or unexported fields
}
Palette is a color picker for a Palette of colors
func NewPalette ¶
NewPalette creates a Palette at the specified location for the specified colors
func (*Palette) Bounds ¶
Bounds returns a rectangle indicating the visible boundaries of the Palette
func (*Palette) Draw ¶
func (p *Palette) Draw(screen *ebiten.Image)
Draw renders the Palette to a screen
func (*Palette) PreferredSize ¶
PreferredSize calculates the desired width and height of the Palette
func (*Palette) SetPosition ¶
SetPosition changes the XY coordinate of the upper-left pixel
func (*Palette) SetVisible ¶
SetVisible changes the visibility of the Palette
type Preview ¶
type Preview struct {
// contains filtered or unexported fields
}
Preview displays the currently selected FG and BG colors
func NewPreview ¶
NewPreview creates a new Preview with the specified size and colors
func (*Preview) Bounds ¶
Bounds returns a Rectangle defining the visible area occupied by the Preview
func (*Preview) Draw ¶
func (p *Preview) Draw(screen *ebiten.Image)
Draw renders the Preview to a screen
func (*Preview) PreferredSize ¶
PreferredSize calculated the desired height and width of the Preview
func (*Preview) SetPosition ¶
SetPosition changes the XY coordinate of the upper-left pixel
func (*Preview) SetVisible ¶
SetVisible changes the visibility of the Preview
type Swatch ¶
type Swatch struct {
// contains filtered or unexported fields
}
Swatch is a color swatch
func (*Swatch) PreferredSize ¶
PreferredSize calculates the desired width and height of the Swatch
func (*Swatch) SetPosition ¶
SetPosition changes the XY coordinate of the upper-left pixel
func (*Swatch) SetVisible ¶
SetVisible changes the visibility of the Swatch