image

package
v0.0.0-...-e43e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateOptimizedSize

func CalculateOptimizedSize(points []model.Point, tolerance float64) (int, int, int, int)

func Crop

func Crop(i image.Image, rectangle image.Rectangle) image.Image

func ToPNGReader

func ToPNGReader(img image.Image) (io.Reader, error)

Types

type Bound

type Bound struct {
	X Point
	Y Point
}

type Point

type Point struct {
	X int
	Y int
}

type Polygon

type Polygon struct {
	*geometry.Polygon
	Bound Bound
}

func NewImagePolygon

func NewImagePolygon(polygon *geometry.Polygon, bound Bound) *Polygon

func (*Polygon) At

func (c *Polygon) At(x, y int) color.Color

func (*Polygon) Bounds

func (c *Polygon) Bounds() image.Rectangle

func (*Polygon) Clip

func (c *Polygon) Clip(from image.Image, crop bool) image.Image

func (*Polygon) ColorModel

func (c *Polygon) ColorModel() color.Model

Jump to

Keyboard shortcuts

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