Celogeek c34a255768
26 expose the internal epub and epub options package (#44)
* make epub and epub options public

* export only interface
2025-01-05 16:57:23 +01:00

22 lines
622 B
Go

package epuboptions
import (
"github.com/celogeek/go-comic-converter/v3/internal/pkg/utils"
)
type View struct {
Width int `yaml:"-" json:"width"`
Height int `yaml:"-" json:"height"`
AspectRatio float64 `yaml:"aspect_ratio" json:"aspect_ratio"`
PortraitOnly bool `yaml:"portrait_only" json:"portrait_only"`
Color Color `yaml:"color" json:"color"`
}
func (v View) Dimension() string {
return utils.IntToString(v.Width) + "x" + utils.IntToString(v.Height)
}
func (v View) Port() string {
return "width=" + utils.IntToString(v.Width) + ",height=" + utils.IntToString(v.Height)
}