canvas

package
v0.0.0-...-8cfed74 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	Pixels [][]color.Color
	// contains filtered or unexported fields
}

Canvas is a collection of pixels

func New

func New(w, h int) Canvas

New returns a new Canvas with width w and height h

func (*Canvas) ToPPM

func (c *Canvas) ToPPM() string

ToPPM converts a canvas to a PPM image type

func (*Canvas) WritePixel

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

WritePixel writes a color at width x and height y

Jump to

Keyboard shortcuts

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