shinygolang.org/x/exp/shiny/imageutil Index | Files

package imageutil

import "golang.org/x/exp/shiny/imageutil"

Package imageutil implements some image utility functions.

Index

Functions

func Border

func Border(r image.Rectangle, inset int) [4]image.Rectangle

Border returns four rectangles that together contain those points between r and r.Inset(inset). Visually:

00000000
00000000
11....22
11....22
11....22
33333333
33333333

The inset may be negative, in which case the points will be outside r.

Some of the returned rectangles may be empty. None of the returned rectangles will overlap.

Source Files

imageutil.go

Version
v0.0.0-20250218142911-aa4b98e5adaa (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
1 month ago

Tools for package owners.