Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colour ¶
Colour is a colour in the format #RGB, #RGBA, #RRGGBB, or #RRGGBBAA.
func (Colour) MarshalFlag ¶
MarshalFlag returns the string representation of a colour in the format #RRGGBBAA.
func (*Colour) UnmarshalFlag ¶
UnmarshalFlag parses a string representation of a colour in the format #RGB, #RGBA, #RRGGBB, or #RRGGBBAA.
type InputCommand ¶
type InputCommand struct {
// Input is the name of the input file.
Input flags.Filename `short:"i" long:"input" description:"The name of the input file or - for STDIN" optional:"true" default:"-"`
}
InputCommand is the base command for commands that take an input file.
type OutputCommand ¶
type OutputCommand struct {
// Output is the name of the output file.
Output flags.Filename `short:"o" long:"output" description:"The name of the output file or - for STDOUT" optional:"true" default:"-"`
// Format is the output format, if an output filename is not specified; it is used for chaining.
Format string `` /* 160-byte string literal not displayed */
// DPI is the image resolution in Dots Per Inch.
DPI float64 `short:"d" long:"dpi" description:"The image resolution in DPI - Dots Per Inch" optional:"true" default:"72"`
}
OutputCommand is the base command for commands that produce an output file.
func (*OutputCommand) WriteOutput ¶
func (cmd *OutputCommand) WriteOutput(img image.Image) error
OutputStream returns an io.Writer for the output file.
type Point ¶
type Point struct {
X, Y float64
}
Point is a 2D coordinate as floats.
func (Point) MarshalFlag ¶
MarshalFlag returns the string representation of a point in the format "x,y".
func (*Point) UnmarshalFlag ¶
UnmarshalFlag parses a string representation of a point in the format "x,y".
type Size ¶
type Size struct {
X, Y int
}
Size is a 2D coordinate.
func (Size) MarshalFlag ¶
MarshalFlag returns the string representation of a size in the format "x,y".
func (*Size) UnmarshalFlag ¶
UnmarshalFlag parses a string representation of a size in the format "x,y".