Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Presets = map[Preset]presetDimensions{ PresetWidescreen: {Width: 1920, Height: 1080}, PresetDesktop: {Width: 1440, Height: 900}, PresetSquare: {Width: 1200, Height: 1200}, PresetPortrait: {Width: 1080, Height: 1350}, }
Presets maps preset name strings to their width and height.
Functions ¶
func PresetNames ¶
func PresetNames() []string
PresetNames returns the ordered list of available preset names. This is maintained as a literal slice because Go maps are unordered.
Types ¶
type Config ¶
type Config struct {
URL string
Dir string
Filename string
Preset Preset
Width int
Height int
Zoom float64
Scroll int
Delay time.Duration
ChromePath string
}
Config holds all configuration for taking a screenshot.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config populated with sensible defaults.
func (*Config) ApplyPreset ¶
ApplyPreset sets Width and Height from the named preset.
Click to show internal directories.
Click to hide internal directories.