gorcle

package module
v0.0.0-...-76a13e2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MPL-2.0 Imports: 6 Imported by: 1

README

A library to draw a circle onto an img in golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

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

A Circle has a radius and a color. The zero value is invalid! Use NewCircle() to create a valid Circle.

func NewCircle

func NewCircle(fill color.Color, radius int) *Circle

NewCircle create a new Circle By calling newShape() we pass on any checking to newShape() without having to know what if any is required. This satisfies the Filler, Radiuser, Drawer, and Stringer interfaces.

func (*Circle) Draw

func (circle *Circle) Draw(img draw.Image, x, y int) error

Draw draws the given circle onto the image with the params x and y center coordinates within the image

func (*Circle) SavePNG

func (circle *Circle) SavePNG(fileName string, img draw.Image) error

SavePNG saves the circle as a png to the file fileName or to image.png

func (*Circle) String

func (circle *Circle) String() string

Jump to

Keyboard shortcuts

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