edwood: github.com/rjkroege/edwood/internal/draw Index | Files | Directories

package draw

import "github.com/rjkroege/edwood/internal/draw"

Index

Package Files

9fans.go interface.go

Constants

const (
    Refnone = draw.Refnone

    KeyCmd      = draw.KeyCmd
    KeyDown     = draw.KeyDown
    KeyEnd      = draw.KeyEnd
    KeyHome     = draw.KeyHome
    KeyInsert   = draw.KeyInsert
    KeyLeft     = draw.KeyLeft
    KeyPageDown = draw.KeyPageDown
    KeyPageUp   = draw.KeyPageUp
    KeyRight    = draw.KeyRight
    KeyUp       = draw.KeyUp

    Darkyellow    = draw.Darkyellow
    Medblue       = draw.Medblue
    Nofill        = draw.Nofill
    Notacolor     = draw.Notacolor
    Palebluegreen = draw.Palebluegreen
    Palegreygreen = draw.Palegreygreen
    Paleyellow    = draw.Paleyellow
    Purpleblue    = draw.Purpleblue
    Transparent   = draw.Transparent
    White         = draw.White
    Yellowgreen   = draw.Yellowgreen
)

Variables

var Init = draw.Init

func Main Uses

func Main(f func(*Device))

type Color Uses

type Color = draw.Color

type Cursor Uses

type Cursor = draw.Cursor

type Device Uses

type Device struct{}

func (*Device) NewDisplay Uses

func (dev *Device) NewDisplay(errch chan<- error, fontname, label, winsize string) (Display, error)

type Display Uses

type Display interface {
    ScreenImage() Image
    White() Image
    Black() Image
    Opaque() Image
    Transparent() Image

    InitKeyboard() *Keyboardctl
    InitMouse() *Mousectl
    OpenFont(name string) (Font, error)
    AllocImage(r image.Rectangle, pix Pix, repl bool, val Color) (Image, error)
    AllocImageMix(color1, color3 Color) Image
    Attach(ref int) error
    Flush() error
    ScaleSize(n int) int
    ReadSnarf(buf []byte) (int, int, error)
    WriteSnarf(data []byte) error
    MoveTo(pt image.Point) error
    SetCursor(c *Cursor) error
}

type Font Uses

type Font interface {
    Name() string
    Height() int
    BytesWidth(b []byte) int
    RunesWidth(r []rune) int
    StringWidth(s string) int
}

type Image Uses

type Image interface {
    Display() Display
    Pix() Pix
    R() image.Rectangle

    Draw(r image.Rectangle, src, mask Image, p1 image.Point)
    Border(r image.Rectangle, n int, color Image, sp image.Point)
    Bytes(pt image.Point, src Image, sp image.Point, f Font, b []byte) image.Point
    Free() error
}

type Keyboardctl Uses

type Keyboardctl = draw.Keyboardctl

type Mouse Uses

type Mouse = draw.Mouse

type Mousectl Uses

type Mousectl = draw.Mousectl

type Pix Uses

type Pix = draw.Pix

Directories

PathSynopsis
drawutilPackage drawutil contains draw related utility functions.

Package draw imports 2 packages (graph) and is imported by 3 packages. Updated 2019-06-26. Refresh now. Tools for package owners.