Back to godoc.org
golang.org/x/exp / shiny / imageutil

Package imageutil

v0.0.0 (0022984)
Latest Go to latest
Published: May 13, 2020 | License: BSD-3-Clause | Module: golang.org/x/exp

Overview

Package imageutil implements some image utility functions.

Index

Package Files

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier