frame

package
v0.0.0-...-435e233 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WHITE = color.RGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff}
	RED   = color.RGBA{R: 0xff, A: 0xff}
	GREEN = color.RGBA{G: 0xff, A: 0xff}
	BLUE  = color.RGBA{B: 0xff, A: 0xff}
)

Functions

This section is empty.

Types

type Frame

type Frame struct {
	SetPixel   setPixel
	GetPixel   getPixel
	BlendPixel blendPixel
	// contains filtered or unexported fields
}

func NewFrame

func NewFrame(width, height int, set setPixel, get getPixel) Frame

func (Frame) DrawCircle

func (f Frame) DrawCircle(x0, y0, r int, color color.Color)

func (Frame) DrawLine

func (f Frame) DrawLine(x0, y0, x1, y1 int, color color.Color)

func (Frame) DrawRectangle

func (f Frame) DrawRectangle(x0, y0, x1, y1 int, color color.Color)

func (Frame) DrawTriangle

func (f Frame) DrawTriangle(x1, y1, x2, y2, x3, y3 int, color color.Color)

func (Frame) Fill

func (f Frame) Fill(color color.Color)

func (Frame) FillCircle

func (f Frame) FillCircle(x0, y0, r int, color color.Color)

func (Frame) FillRectangle

func (f Frame) FillRectangle(x0, y0, x1, y1 int, color color.Color)

func (Frame) FillTriangle

func (f Frame) FillTriangle(ax, ay, bx, by, cx, cy int, color color.Color)

func (*Frame) Resize

func (f *Frame) Resize(newWidth, newHeight int)

func (*Frame) UpdateGetPixelMethod

func (f *Frame) UpdateGetPixelMethod(get getPixel)

func (*Frame) UpdateSetPixelMethod

func (f *Frame) UpdateSetPixelMethod(set setPixel)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL