Versions in this module Expand all Collapse all v0 v0.0.4 Apr 17, 2021 v0.0.3 Apr 9, 2021 Changes in this version + const BorderWidth + const CAlpha + const CBlue + const CGreen + const CGrey + const CIgnore + const CMap + const CRed + const Clear + const D + const DatopS + const DefaultDPI + const DinS + const DoutS + const DoverS + const DxorS + const ICOSSCALE + const KeyAlt + const KeyBackspace + const KeyCmd + const KeyCtl + const KeyDelete + const KeyDown + const KeyEOF + const KeyEnd + const KeyEscape + const KeyFn + const KeyHome + const KeyInsert + const KeyLeft + const KeyPageDown + const KeyPageUp + const KeyPrint + const KeyRight + const KeyShift + const KeyUp + const KeyView + const NChan + const Ncomp + const RefBackup + const RefMesg + const RefNone + const S + const SatopD + const SinD + const SoutD + const SoverD + const SxorD + var ABGR32 = MakePix(CAlpha, 8, CBlue, 8, CGreen, 8, CRed, 8) + var ARGB32 = MakePix(CAlpha, 8, CRed, 8, CGreen, 8, CBlue, 8) + var BGR24 = MakePix(CBlue, 8, CGreen, 8, CRed, 8) + var CMAP8 Pix = MakePix(CMap, 8) + var CMap8Model color.Model = color.ModelFunc(cmapModel) + var CRGB15Model color.Model = color.ModelFunc(crgb15Model) + var CRGB16Model color.Model = color.ModelFunc(crgb16Model) + var GREY1 Pix = MakePix(CGrey, 1) + var GREY2 Pix = MakePix(CGrey, 2) + var GREY4 Pix = MakePix(CGrey, 4) + var GREY8 Pix = MakePix(CGrey, 8) + var Gray1Model color.Model = color.ModelFunc(gray1Model) + var Gray2Model color.Model = color.ModelFunc(gray2Model) + var Gray4Model color.Model = color.ModelFunc(gray4Model) + var RGB15 Pix = MakePix(CIgnore, 1, CRed, 5, CGreen, 5, CBlue, 5) + var RGB16 = MakePix(CRed, 5, CGreen, 6, CBlue, 5) + var RGB24 = MakePix(CRed, 8, CGreen, 8, CBlue, 8) + var RGBA32 = MakePix(CRed, 8, CGreen, 8, CBlue, 8, CAlpha, 8) + var XBGR32 = MakePix(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8) + var XRGB32 = MakePix(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8) + func BytesPerLine(r Rectangle, depth int) int + func CombineRect(r1 *Rectangle, r2 Rectangle) + func GenDrawOp(dst *Image, r Rectangle, src *Image, p0 Point, mask *Image, p1 Point, op Op) + func IntCosSin(deg int) (cos, sin int) + func IntCosSin2(x, y int) (cos, sin int) + func MenuHit(but int, mc *Mousectl, me *Menu, scr *Screen) int + func MouseScrollSize(maxlines int) int + func RectClip(rp *Rectangle, b Rectangle) bool + func RectInRect(r, s Rectangle) bool + func RectXRect(r, s Rectangle) bool + func ReplXY(min, max, x int) int + func WordsPerLine(r Rectangle, depth int) int + type CMap8 struct + I uint8 + func (c CMap8) RGBA() (r, g, b, a uint32) + type CRGB15 struct + V uint16 + func (c CRGB15) RGBA() (r, g, b, a uint32) + type CRGB16 struct + V uint16 + func (c CRGB16) RGBA() (r, g, b, a uint32) + type Color uint32 + const Black + const Blue + const BlueGreen + const Cyan + const DarkBlue + const DarkGreen + const DarkYellow + const Green + const GreyBlue + const GreyGreen + const Magenta + const MedBlue + const MedGreen + const NoFill + const Opaque + const PaleBlue + const PaleBlueGreen + const PaleGreen + const PaleGreyBlue + const PaleGreyGreen + const PaleYellow + const PurpleBlue + const Red + const Transparent + const White + const Yellow + const YellowGreen + func (c Color) RGBA() (r, g, b, a uint32) + func (c Color) WithAlpha(alpha uint8) Color + type Cursor struct + Black [2 * 16]uint8 + White [2 * 16]uint8 + type Cursor2 struct + Black [4 * 32]uint8 + White [4 * 32]uint8 + func ScaleCursor(c Cursor) Cursor2 + type Display struct + Black *Image + DPI int + Font *Font + Image *Image + Opaque *Image + Screen *Screen + ScreenImage *Image + Transparent *Image + White *Image + Windows *Image + func Init(errch chan<- error, font, label, size string) (d *Display, err error) + func (d *Display) AllocImage(r Rectangle, pix Pix, repl bool, color Color) (*Image, error) + func (d *Display) AllocImageMix(color1, color3 Color) *Image + func (d *Display) Attach(ref int) error + func (d *Display) BuildFont(buf []byte, name string) (*Font, error) + func (d *Display) Close() error + func (d *Display) Flush() error + func (d *Display) HiDPI() bool + func (d *Display) InitKeyboard() *Keyboardctl + func (d *Display) InitMouse() *Mousectl + func (d *Display) MoveCursor(pt Point) error + func (d *Display) OpenFont(name string) (*Font, error) + func (d *Display) ReadImage(r io.Reader) (*Image, error) + func (d *Display) ReadSnarf(buf []byte) (int, int, error) + func (d *Display) Resize(r Rectangle) + func (d *Display) Scale(n int) int + func (d *Display) ScaleSize(n int) int + func (d *Display) SetDebug(debug bool) + func (d *Display) SetLabel(label string) + func (d *Display) SwitchCursor(c *Cursor) error + func (d *Display) SwitchCursor2(c *Cursor, c2 *Cursor2) error + func (d *Display) Top() + func (d *Display) WriteSnarf(data []byte) error + type End int + const EndArrow + const EndDisc + const EndSquare + func Arrow(a, b, c int) End + type Font struct + Ascent int + Display *Display + Height int + Name string + Scale int + func (f *Font) BytesSize(b []byte) Point + func (f *Font) BytesWidth(b []byte) int + func (f *Font) Free() + func (f *Font) RunesSize(r []rune) Point + func (f *Font) RunesWidth(r []rune) int + func (f *Font) StringSize(s string) Point + func (f *Font) StringWidth(s string) int + type Fontchar struct + Bottom uint8 + Left int8 + Top uint8 + Width uint8 + X int + type Gray1 struct + White bool + func (c Gray1) RGBA() (r, g, b, a uint32) + type Gray2 struct + Y uint8 + func (c Gray2) RGBA() (r, g, b, a uint32) + type Gray4 struct + Y uint8 + func (c Gray4) RGBA() (r, g, b, a uint32) + type Image struct + Clipr Rectangle + Depth int + Display *Display + Pix Pix + R Rectangle + Repl bool + Screen *Screen + func (dst *Image) Arc(c Point, a, b, thick int, src *Image, sp Point, alpha, phi int) + func (dst *Image) ArcOp(c Point, a, b, thick int, src *Image, sp Point, alpha, phi int, op Op) + func (dst *Image) BSpline(pt []Point, end0, end1 End, radius int, src *Image, sp Point) + func (dst *Image) BSplineOp(pt []Point, end0, end1 End, radius int, src *Image, sp Point, op Op) + func (dst *Image) Bezier(a, b, c, d Point, end0, end1 End, radius int, src *Image, sp Point) + func (dst *Image) BezierOp(a, b, c, d Point, end0, end1 End, radius int, src *Image, sp Point, op Op) + func (dst *Image) Border(r Rectangle, w int, color *Image, sp Point) + func (dst *Image) BorderOp(r Rectangle, n int, color *Image, sp Point, op Op) + func (dst *Image) Bytes(p Point, src *Image, sp Point, f *Font, b []byte) Point + func (dst *Image) BytesBg(p Point, src *Image, sp Point, f *Font, b []byte, bg *Image, bgp Point) Point + func (dst *Image) BytesBgOp(p Point, src *Image, sp Point, f *Font, b []byte, bg *Image, bgp Point, op Op) Point + func (dst *Image) BytesOp(p Point, src *Image, sp Point, f *Font, b []byte, op Op) Point + func (dst *Image) Cload(r Rectangle, data []byte) (int, error) + func (dst *Image) Draw(r Rectangle, src, mask *Image, p Point) + func (dst *Image) DrawOp(r Rectangle, src, mask *Image, p Point, op Op) + func (dst *Image) Ellipse(c Point, a, b, thick int, src *Image, sp Point) + func (dst *Image) EllipseOp(c Point, a, b, thick int, src *Image, sp Point, op Op) + func (dst *Image) FillArc(c Point, a, b int, src *Image, sp Point, alpha, phi int) + func (dst *Image) FillArcOp(c Point, a, b int, src *Image, sp Point, alpha, phi int, op Op) + func (dst *Image) FillBSpline(pt []Point, wind int, src *Image, sp Point) + func (dst *Image) FillBSplineOp(pt []Point, wind int, src *Image, sp Point, op Op) + func (dst *Image) FillBezier(a, b, c, d Point, wind int, src *Image, sp Point) + func (dst *Image) FillBezierOp(a, b, c, d Point, wind int, src *Image, sp Point, op Op) + func (dst *Image) FillEllipse(c Point, a, b int, src *Image, sp Point) + func (dst *Image) FillEllipseOp(c Point, a, b int, src *Image, sp Point, op Op) + func (dst *Image) FillPoly(p []Point, wind int, src *Image, sp Point) + func (dst *Image) FillPolyOp(p []Point, wind int, src *Image, sp Point, op Op) + func (dst *Image) GenDraw(r Rectangle, src *Image, p0 Point, mask *Image, p1 Point) + func (dst *Image) Line(p0, p1 Point, end0, end1 End, thick int, src *Image, sp Point) + func (dst *Image) LineOp(p0, p1 Point, end0, end1 End, radius int, src *Image, sp Point, op Op) + func (dst *Image) Load(r Rectangle, data []byte) (n int, err error) + func (dst *Image) Poly(p []Point, end0, end1 End, radius int, src *Image, sp Point) + func (dst *Image) PolyOp(p []Point, end0, end1 End, radius int, src *Image, sp Point, op Op) + func (dst *Image) ReplClipr(repl bool, clipr Rectangle) + func (dst *Image) Runes(p Point, src *Image, sp Point, f *Font, r []rune) Point + func (dst *Image) RunesBg(p Point, src *Image, sp Point, f *Font, r []rune, bg *Image, bgp Point) Point + func (dst *Image) RunesBgOp(p Point, src *Image, sp Point, f *Font, r []rune, bg *Image, bgp Point, op Op) Point + func (dst *Image) RunesOp(p Point, src *Image, sp Point, f *Font, r []rune, op Op) Point + func (dst *Image) String(p Point, src *Image, sp Point, f *Font, s string) Point + func (dst *Image) StringBg(p Point, src *Image, sp Point, f *Font, s string, bg *Image, bgp Point) Point + func (dst *Image) StringBgOp(p Point, src *Image, sp Point, f *Font, s string, bg *Image, bgp Point, op Op) Point + func (dst *Image) StringOp(p Point, src *Image, sp Point, f *Font, s string, op Op) Point + func (i *Image) AllocScreen(fill *Image, public bool) (*Screen, error) + func (i *Image) At(x, y int) color.Color + func (i *Image) Bounds() Rectangle + func (i *Image) ColorModel() color.Model + func (i *Image) Free() error + func (i *Image) Unload(r Rectangle, data []byte) (n int, err error) + type Keyboardctl struct + C <-chan rune + type Menu struct + Gen func(k int, buf []byte) (text []byte, ok bool) + Item []string + LastHit int + type Mouse struct + Buttons int + Msec uint32 + type Mousectl struct + C <-chan Mouse + Display *Display + Resize <-chan bool + func (mc *Mousectl) Read() Mouse + type Op int + type Pix uint32 + func MakePix(list ...int) Pix + func ParsePix(s string) (Pix, error) + func (p Pix) Depth() int + func (p Pix) Split() []int + func (p Pix) String() string + type Point = image.Point + var ZP Point + func Pt(x, y int) Point + func Repl(r Rectangle, p Point) Point + type Rectangle = image.Rectangle + var ZR Rectangle + func Rect(x1, y1, x2, y2 int) Rectangle + func Rpt(min, max Point) Rectangle + func SweepRect(but int, mc *Mousectl) Rectangle + type Screen struct + Display *Display + Fill *Image + func (s *Screen) Free() error v0.0.2 Jun 20, 2019 v0.0.1 Jun 19, 2019