Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotateAny ¶
type RotateAny struct { Angle string `json:"angle,omitempty"` Color string `json:"color,omitempty"` }
RotateAny rotates an image by a specific angle counter-clockwise. Uncovered areas after the rotation are filled with the specified color.
type RotateAnyFactory ¶
type RotateAnyFactory struct{}
RotateAnyFactory creates RotateAny instances.
func (RotateAnyFactory) Name ¶
func (ff RotateAnyFactory) Name() string
Name returns the name of the filter, which is also the directive used in the image filter block.
func (RotateAnyFactory) New ¶
func (ff RotateAnyFactory) New(args ...string) (imagefilter.Filter, error)
New initialises and returns a configured Fit instance.
Syntax:
rotate_any <angle> <color>
Parameters:
angle is the angle as floating point number in degrees by which the image is rotated counter-clockwise.
color is the color which is used to fill uncovered areas after the rotation. Supported formats are:
"#FFAADD" (in quotes because otherwise it will be a comment in a caddyfile) rgb(255,170,221) rgba(255,170,221,0.5) transparent, black, white, blue or about 140 more
(see for many more supported color words https://www.w3schools.com/colors/colors_names.asp)
func (RotateAnyFactory) Unmarshal ¶
func (ff RotateAnyFactory) Unmarshal(data []byte) (imagefilter.Filter, error)
Unmarshal decodes JSON data and returns a RotateAny instance.