crop

package
v0.0.0-...-bbf78bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(img image.Image, start, end position.Position) image.Image

Copy returns a cropped image obtained by drawing a segment of the old image into a new one, between the given coordinates points

func Cut

func Cut(img image.Image, start, end position.Position) image.Image

Cut returns a cropped image that shares memory with the original one between the given coordinates points

Types

type ImageSlice

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

ImageSlice is an Image interface implementation that encapsulate a cropped image that shares memory with the original image

func (*ImageSlice) At

func (slice *ImageSlice) At(x, y int) color.Color

func (*ImageSlice) Bounds

func (slice *ImageSlice) Bounds() image.Rectangle

func (*ImageSlice) ColorModel

func (slice *ImageSlice) ColorModel() color.Model

Jump to

Keyboard shortcuts

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