Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mode ¶
type Mode int
Mode specifies an algorithm for cropping, panning, and scaling the image.
const ( // Tile crops the image to the area of interest then repeats it to cover the // output starting from the top-left corner of the screen. Tile Mode = iota // Center crops the image to the area of interest then centers it on the // output. If it is larger than the output, parts of it will be cut off. Center // Stretch crops the image to the area of interest then stretches it to // cover the output, ignoring the aspect ratio. Stretch // Zoom crops the image to the area of interest then zooms the image in or // out until the shortest dimension matches the output. If the aspect ratio // doesn't match the output, parts of it will be cut off. Zoom // Maximize crops the image to the area of interest then zooms the image in // or out as necessary to ensure the entire image is visible, centering it // if it is smaller. Maximize // Focus zooms the image out to ensure the entire area of interest is // visible, then zooms in if necessary to eliminate black areas. Unlike // [Maximize], the parts of the image outside of the area of interest are // not cropped. Focus )
Click to show internal directories.
Click to hide internal directories.