utils

package
v0.0.0-...-dcc2305 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2015 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenPNG

func OpenPNG(filepath string) (bool, *image.Image)

Types

type Color

type Color [3]float64

func ColorAddition

func ColorAddition(left, right Color) Color

func ColorFloatDevide

func ColorFloatDevide(c Color, divider float64) Color

func ColorFloatMulti

func ColorFloatMulti(c Color, mult float64) Color

func ColorMultiplication

func ColorMultiplication(left, right Color) Color

func NewColor

func NewColor(r, g, b uint8) Color

func (*Color) Devide

func (c *Color) Devide(divider float64)

func (*Color) Multiply

func (c *Color) Multiply(mult float64)

func (Color) ToRGB

func (c Color) ToRGB() (uint8, uint8, uint8)

type PNGSaver

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

func NewPNG

func NewPNG(imgWidth, imgHeight int, fileName string) *PNGSaver

func (*PNGSaver) SavePNG

func (i *PNGSaver) SavePNG() bool

func (*PNGSaver) SetPixelAt

func (i *PNGSaver) SetPixelAt(x, y int, col *Color)

Jump to

Keyboard shortcuts

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