xdraw

package
v0.0.0-...-b509ac4 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundingBox

func BoundingBox(pts []image.Point) image.Rectangle

BoundingBox returns the smallest rectangle that contains all of the given points.

func DrawCircle

func DrawCircle(img draw.Image, center image.Point, radius int, color color.Color)

DrawCircle draws a circle onto the given image.

func EachCirclePx

func EachCirclePx(center image.Point, radius int, fn func(image.Point) (stop bool))

EachCirclePx calls fn for each pixel within the circle defined by center and radius.

func PtIx

func PtIx(r image.Rectangle, x, y int) int

PtIx returns the flat index of the given point in the given rectangle.

func SubImage

func SubImage(img image.Image, bounds image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value may or may not share pixels with the original image.

Types

This section is empty.

Jump to

Keyboard shortcuts

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