Documentation ¶
Index ¶
- func AllImagesSameSize(images []image.Image) bool
- func GenerateTestImages(count, width, height int) ([]image.Image, error)
- func GenerateTestImagesBW(count, width, height int) ([]image.Image, error)
- type Border
- type BorderType
- type CustomColor
- type Global
- type Layout
- type Margin
- type MarginValue
- type OutputPage
- type PageSetup
- type Position
- type ZineLayout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllImagesSameSize ¶
New function to handle image rotation
Types ¶
type Border ¶
type Border struct { Enabled bool `yaml:"enabled"` Color CustomColor `yaml:"color"` Type BorderType `yaml:"type"` }
type BorderType ¶
type BorderType string
BorderType represents the type of border to draw
const ( BorderTypePlain BorderType = "plain" BorderTypeDotted BorderType = "dotted" BorderTypeDashed BorderType = "dashed" BorderTypeCorner BorderType = "corner" )
func ParseBorderType ¶
func ParseBorderType(borderTypeString string) (BorderType, error)
ParseBorderType converts a string to a BorderType
type CustomColor ¶
CustomColor is a wrapper around color.RGBA that implements yaml.Unmarshaler
func (*CustomColor) UnmarshalYAML ¶
func (c *CustomColor) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface
type Margin ¶
type Margin struct { Top MarginValue `yaml:"top"` Bottom MarginValue `yaml:"bottom"` Left MarginValue `yaml:"left"` Right MarginValue `yaml:"right"` PPI float64 `yaml:"-"` }
func (*Margin) ComputePixelValues ¶
func (Margin) MarshalYAML ¶
func (*Margin) UnmarshalYAML ¶
type MarginValue ¶
func (*MarginValue) String ¶
func (mv *MarginValue) String() string
func (*MarginValue) UpdateExpression ¶
func (mv *MarginValue) UpdateExpression(expression string, ppi float64) error
func (*MarginValue) UpdatePixels ¶
func (mv *MarginValue) UpdatePixels(pixels int, ppi float64)
type OutputPage ¶
type ZineLayout ¶
type ZineLayout struct { PageSetup *PageSetup `yaml:"page_setup"` OutputPages []*OutputPage `yaml:"output_pages"` Global *Global `yaml:"global"` }
func (*ZineLayout) ComputeAllMargins ¶
func (zl *ZineLayout) ComputeAllMargins() error
func (*ZineLayout) CreateOutputImage ¶
func (zl *ZineLayout) CreateOutputImage(outputPage *OutputPage, inputImages []image.Image) (image.Image, error)
Click to show internal directories.
Click to hide internal directories.