Versions in this module Expand all Collapse all v0 v0.0.7 Dec 29, 2018 Changes in this version + const AlphaAdd + const AlphaAnd + const AlphaAndNot + const AlphaMultiply + const AlphaNone + const AlphaOr + const AlphaSub + const AlphaXor + const Depth16Bit + const Depth24Bit + const Depth32Bit + const Depth8Bit + const DrawModFlipBoth + const DrawModFlipX + const DrawModFlipY + const DrawModNone + var Aqua color.RGBA + var Black color.RGBA + var Blue color.RGBA + var Fuscia color.RGBA + var Gray color.RGBA + var Green color.RGBA + var Lime color.RGBA + var Maroon color.RGBA + var Navy color.RGBA + var NullCol color.RGBA + var Olive color.RGBA + var Orange color.RGBA + var Purple color.RGBA + var Red color.RGBA + var Silver color.RGBA + var Teal color.RGBA + var White color.RGBA + var Yellow color.RGBA + func AlphaAddColor(src, dst, alp uint8) byte + func AlphaAndColor(src, dst uint8) byte + func AlphaAndNotColor(src, dst uint8) byte + func AlphaChoose(src, dst, alp, ab uint8) byte + func AlphaMultiplyColor(src, dst uint8) byte + func AlphaOrColor(src, dst uint8) byte + func AlphaSubColor(src, dst uint8) byte + func AlphaXorColor(src, dst uint8) byte + func CopyDrawer(dd, ds Drawer, x, y, xs, ys, w, h int32) + func CopyDrawerFlipBoth(dd, ds Drawer, x, y, xs, ys, w, h int32) + func CopyDrawerFlipX(dd, ds Drawer, x, y, xs, ys, w, h int32) + func CopyDrawerFlipY(dd, ds Drawer, x, y, xs, ys, w, h int32) + func CopyDrawerMod(dd, ds Drawer, x, y, xs, ys, w, h int32, dm uint8) + func DrawChar(dr Drawer, s string, x, y, sc int32, c color.RGBA, cs *CharacterSet) error + func DrawCharFlip(dr Drawer, s string, x, y, sc int32, c color.RGBA, cs *CharacterSet) error + func DrawLine(dr Drawer, x, y, x2, y2 int32, c color.RGBA) + func DrawRectBorder(dr Drawer, x, y, w, h int32, c color.RGBA) + func DrawRectFill(dr Drawer, x, y, w, h int32, c color.RGBA) + func DrawString(dr Drawer, s string, x, y, sc int32, c color.RGBA, cs *CharacterSet) []error + func DrawStringFlip(dr Drawer, s string, x, y, sc int32, c color.RGBA, cs *CharacterSet) []error + func NewImageFromDrawer(dr Drawer) draw.Image + func NewScreen(w, h, rw, rh int32, n string, fs, vs, lf bool) (*Screen, *Layer, error) + func RandColor(s int) (c color.RGBA) + type CharacterSet struct + Char0 string + Char1 string + Char2 string + Char3 string + Char4 string + Char5 string + Char6 string + Char7 string + Char8 string + Char9 string + CharA string + CharAmp string + CharApostrophe string + CharAsterisks string + CharAt string + CharB string + CharBackSlash string + CharBackTick string + CharC string + CharCarrot string + CharCloseBracketCurved string + CharCloseBracketSquare string + CharCloseCurleyBrace string + CharColon string + CharComma string + CharD string + CharDblQuote string + CharE string + CharEqual string + CharExclaim string + CharF string + CharForwardSlash string + CharG string + CharGreaterThan string + CharH string + CharHash string + CharHeight int32 + CharI string + CharJ string + CharK string + CharL string + CharLessThan string + CharM string + CharMinus string + CharN string + CharNoChar string + CharO string + CharOpenBracketCurved string + CharOpenBracketSquare string + CharOpenCurleyBrace string + CharP string + CharPercent string + CharPeriod string + CharPipe string + CharPlus string + CharQ string + CharQuestion string + CharR string + CharS string + CharSemiColon string + CharSpace string + CharString string + CharT string + CharTilde string + CharU string + CharUnderScore string + CharV string + CharW string + CharWidth int32 + CharX string + CharY string + CharZ string + Chara string + Charb string + Charc string + Chard string + Chare string + Charf string + Charg string + Charh string + Chari string + Charj string + Chark string + Charl string + Charm string + Charn string + Charo string + Charp string + Charq string + Charr string + Chars string + Chart string + Charu string + Charv string + Charw string + Charx string + Chary string + Charz string + func (CS *CharacterSet) InitCharMap() + type ColorCount struct + func CountColors(dr Drawer) ColorCount + func (cc ColorCount) Len() int + func (cc ColorCount) Less(i, j int) bool + func (cc ColorCount) Sort() + func (cc ColorCount) Swap(i, j int) + type Drawer interface + Clear func(c color.RGBA) + DrawPoint func(x, y int32, c color.RGBA) + GetHeight func() int32 + GetMemory func() []byte + GetWidth func() int32 + ReadPoint func(x, y int32) (color.RGBA, error) + type ImageWrap struct + A uint8 + M draw.Image + OD bool + func WrapImage(m image.Image) (*ImageWrap, error) + func (iw ImageWrap) Clear(c color.RGBA) + func (iw ImageWrap) DrawPoint(x, y int32, c color.RGBA) + func (iw ImageWrap) GetHeight() int32 + func (iw ImageWrap) GetMemory() []byte + func (iw ImageWrap) GetWidth() int32 + func (iw ImageWrap) ReadPoint(x, y int32) (color.RGBA, error) + type Img struct + A uint8 + H int32 + Memory []byte + OD bool + W int32 + func NewImgFromImage(m image.Image) *Img + func (im *Img) Clear(c color.RGBA) + func (im *Img) DrawPoint(x, y int32, c color.RGBA) + func (im *Img) GetHeight() int32 + func (im *Img) GetMemory() []byte + func (im *Img) GetWidth() int32 + func (im *Img) ReadPoint(x, y int32) (color.RGBA, error) + type Layer struct + A uint8 + H int32 + Hide bool + Memory []byte + OD bool + Scr *Screen + W int32 + func (l *Layer) Clear(c color.RGBA) + func (l *Layer) DrawChar(s string, x, y, sc int32, c color.RGBA) error + func (l *Layer) DrawCharFlip(s string, x, y, sc int32, c color.RGBA) error + func (l *Layer) DrawCircleBorder(x, y int32, r float64, c color.RGBA) + func (l *Layer) DrawCircleFill(x, y int32, r1, r2 float64, c color.RGBA) + func (l *Layer) DrawLine(x, y, x2, y2 int32, c color.RGBA) + func (l *Layer) DrawPoint(x, y int32, c color.RGBA) + func (l *Layer) DrawRectBorder(x, y, w, h int32, c color.RGBA) + func (l *Layer) DrawRectFill(x, y, w, h int32, c color.RGBA) + func (l *Layer) DrawString(s string, x, y, sc int32, c color.RGBA) []error + func (l *Layer) DrawStringFlip(s string, x, y, sc int32, c color.RGBA) []error + func (l *Layer) FlipX() + func (l *Layer) FlipY() + func (l *Layer) GetHeight() int32 + func (l *Layer) GetMemory() []byte + func (l *Layer) GetWidth() int32 + func (l *Layer) Offset(x, y float64) + func (l *Layer) ReadPoint(x, y int32) (color.RGBA, error) + func (l *Layer) Rotate(r float64, p *sdl.Point) + func (l *Layer) Scale(sx, sy float64) + type PImg struct + D uint8 + H int32 + Memory []byte + OD bool + P *Palette + W int32 + func NewPImg(w, h int32, d uint8, p *Palette) (*PImg, error) + func NewPImgFromDrawer(dr Drawer, d uint8) (*PImg, error) + func (pim *PImg) Clear(c color.RGBA) + func (pim *PImg) DrawPoint(x, y int32, c color.RGBA) + func (pim *PImg) DrawPointByIndex(x, y int32, ci uint64) + func (pim *PImg) GetHeight() int32 + func (pim *PImg) GetMemory() []byte + func (pim *PImg) GetWidth() int32 + func (pim *PImg) ReadPoint(x, y int32) (color.RGBA, error) + type Palette []color.RGBA + func (p *Palette) Add(c color.RGBA) + func (p *Palette) ChangeByColor(c, nc color.RGBA) error + func (p *Palette) ChangeByIndex(i int, c color.RGBA) error + func (p *Palette) Clamp(d uint8) + func (p *Palette) Delete(i int) + func (p *Palette) ShiftBack(i int) + func (p *Palette) ShiftForward(i int) + func (p Palette) Convert(c color.RGBA) color.RGBA + func (p Palette) HasColor(c color.RGBA) (bool, int) + func (p Palette) Index(c color.Color) int + type Screen struct + CS *CharacterSet + H int32 + Layers []*Layer + W int32 + func (scr *Screen) NewLayer(w, h int32, lf bool) (*Layer, error) + func (scr *Screen) QuitScreen() + func (scr *Screen) Update() error