canvas

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

This is the simple canvas for debuging

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChar

func GetChar(char byte) []byte

Types

type Canvas

type Canvas struct {
	// contains filtered or unexported fields
}

func NewCanvas

func NewCanvas(rgba *image.RGBA) *Canvas

func (*Canvas) BlendPixel

func (c *Canvas) BlendPixel(x, y int, col color.Color)

func (*Canvas) Clear

func (c *Canvas) Clear(col color.Color)

func (*Canvas) Clip

func (c *Canvas) Clip(x float64, y float64, w float64, h float64)

func (*Canvas) CurrentState

func (c *Canvas) CurrentState() *State

func (*Canvas) DrawCircle

func (c *Canvas) DrawCircle(x0, y0 int, r int)

func (*Canvas) DrawFixedChar

func (c *Canvas) DrawFixedChar(x, y float64, ch byte, pixelSize float64)

func (*Canvas) DrawFixedString

func (c *Canvas) DrawFixedString(x, y float64, str string, pixelSize float64)

func (*Canvas) DrawLine

func (c *Canvas) DrawLine(x0, y0, x1, y1 int, alpha float64)

func (*Canvas) DrawRect

func (c *Canvas) DrawRect(x, y, w, h float64)

func (*Canvas) FillCircle

func (c *Canvas) FillCircle(x, y, radius int)

func (*Canvas) FillRect

func (c *Canvas) FillRect(x, y, w, h int, alpha float64)

func (*Canvas) Height

func (c *Canvas) Height() int

func (*Canvas) RGBA

func (c *Canvas) RGBA() *image.RGBA

func (*Canvas) Restore

func (c *Canvas) Restore()

func (*Canvas) Save

func (c *Canvas) Save()

func (*Canvas) SetColor

func (c *Canvas) SetColor(col color.RGBA)

func (*Canvas) SetLineWidth

func (c *Canvas) SetLineWidth(w float64)

func (*Canvas) SetPixel

func (c *Canvas) SetPixel(x, y float64, a float64)

func (*Canvas) Transform

func (c *Canvas) Transform(x float64, y float64)

func (*Canvas) Width

func (c *Canvas) Width() int

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

Jump to

Keyboard shortcuts

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