capture

package
v0.0.0-...-d74d36f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureConfig

type CaptureConfig struct {
	// Spacing holds the averaging spacing.
	Spacing int
	// Threshold holds the averaged color threshold.
	Threshold int

	// Monitor holds the monitor used for capture.
	Monitor int
}

CaptureConfig holds the configuration for the screen capture.

type Screen

type Screen struct {
	// Areas holds the screen areas.
	Areas []*image.Rectangle
	// Borders holds the capturing borders.
	Borders image.Rectangle

	// Config holds the configuration for the screen capture.
	Config CaptureConfig
}

Screen represents a tiled screen.

func NewScreen

func NewScreen(areas []*image.Rectangle, config CaptureConfig) *Screen

NewScreen returns a new screen, tiled with the given configuration.

func (*Screen) GetColors

func (s *Screen) GetColors() ([]color.RGBA, error)

GetColors returns an averaged color per screen tile.

func (*Screen) SavePreview

func (s *Screen) SavePreview(dst string) error

SavePreview saves the current capture configurations as multiple ".png" images at the given path.

Jump to

Keyboard shortcuts

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