217 lines
5.1 KiB
Go
217 lines
5.1 KiB
Go
|
// Code generated by enum-generate.go DO NOT EDIT.
|
||
|
|
||
|
package imageext
|
||
|
|
||
|
import "gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||
|
import "gogs.mikescher.com/BlackForestBytes/goext/enums"
|
||
|
|
||
|
const ChecksumEnumGenerator = "1da5383c33ee442fd0b899369053f66bdc85bed2dbf906949d3edfeedfe13340" // GoExtVersion: 0.0.449
|
||
|
|
||
|
// ================================ ImageFit ================================
|
||
|
//
|
||
|
// File: image.go
|
||
|
// StringEnum: true
|
||
|
// DescrEnum: false
|
||
|
// DataEnum: false
|
||
|
//
|
||
|
|
||
|
var __ImageFitValues = []ImageFit{
|
||
|
ImageFitStretch,
|
||
|
ImageFitCover,
|
||
|
ImageFitContainCenter,
|
||
|
ImageFitContainTopLeft,
|
||
|
ImageFitContainTopRight,
|
||
|
ImageFitContainBottomLeft,
|
||
|
ImageFitContainBottomRight,
|
||
|
}
|
||
|
|
||
|
var __ImageFitVarnames = map[ImageFit]string{
|
||
|
ImageFitStretch: "ImageFitStretch",
|
||
|
ImageFitCover: "ImageFitCover",
|
||
|
ImageFitContainCenter: "ImageFitContainCenter",
|
||
|
ImageFitContainTopLeft: "ImageFitContainTopLeft",
|
||
|
ImageFitContainTopRight: "ImageFitContainTopRight",
|
||
|
ImageFitContainBottomLeft: "ImageFitContainBottomLeft",
|
||
|
ImageFitContainBottomRight: "ImageFitContainBottomRight",
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) Valid() bool {
|
||
|
return langext.InArray(e, __ImageFitValues)
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) Values() []ImageFit {
|
||
|
return __ImageFitValues
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) ValuesAny() []any {
|
||
|
return langext.ArrCastToAny(__ImageFitValues)
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) ValuesMeta() []enums.EnumMetaValue {
|
||
|
return ImageFitValuesMeta()
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) String() string {
|
||
|
return string(e)
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) VarName() string {
|
||
|
if d, ok := __ImageFitVarnames[e]; ok {
|
||
|
return d
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) TypeName() string {
|
||
|
return "ImageFit"
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) PackageName() string {
|
||
|
return "media"
|
||
|
}
|
||
|
|
||
|
func (e ImageFit) Meta() enums.EnumMetaValue {
|
||
|
return enums.EnumMetaValue{VarName: e.VarName(), Value: e, Description: nil}
|
||
|
}
|
||
|
|
||
|
func ParseImageFit(vv string) (ImageFit, bool) {
|
||
|
for _, ev := range __ImageFitValues {
|
||
|
if string(ev) == vv {
|
||
|
return ev, true
|
||
|
}
|
||
|
}
|
||
|
return "", false
|
||
|
}
|
||
|
|
||
|
func ImageFitValues() []ImageFit {
|
||
|
return __ImageFitValues
|
||
|
}
|
||
|
|
||
|
func ImageFitValuesMeta() []enums.EnumMetaValue {
|
||
|
return []enums.EnumMetaValue{
|
||
|
ImageFitStretch.Meta(),
|
||
|
ImageFitCover.Meta(),
|
||
|
ImageFitContainCenter.Meta(),
|
||
|
ImageFitContainTopLeft.Meta(),
|
||
|
ImageFitContainTopRight.Meta(),
|
||
|
ImageFitContainBottomLeft.Meta(),
|
||
|
ImageFitContainBottomRight.Meta(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ================================ ImageCompresson ================================
|
||
|
//
|
||
|
// File: image.go
|
||
|
// StringEnum: true
|
||
|
// DescrEnum: false
|
||
|
// DataEnum: false
|
||
|
//
|
||
|
|
||
|
var __ImageCompressonValues = []ImageCompresson{
|
||
|
CompressionPNGNone,
|
||
|
CompressionPNGSpeed,
|
||
|
CompressionPNGBest,
|
||
|
CompressionJPEG100,
|
||
|
CompressionJPEG90,
|
||
|
CompressionJPEG80,
|
||
|
CompressionJPEG70,
|
||
|
CompressionJPEG60,
|
||
|
CompressionJPEG50,
|
||
|
CompressionJPEG25,
|
||
|
CompressionJPEG10,
|
||
|
CompressionJPEG1,
|
||
|
}
|
||
|
|
||
|
var __ImageCompressonVarnames = map[ImageCompresson]string{
|
||
|
CompressionPNGNone: "CompressionPNGNone",
|
||
|
CompressionPNGSpeed: "CompressionPNGSpeed",
|
||
|
CompressionPNGBest: "CompressionPNGBest",
|
||
|
CompressionJPEG100: "CompressionJPEG100",
|
||
|
CompressionJPEG90: "CompressionJPEG90",
|
||
|
CompressionJPEG80: "CompressionJPEG80",
|
||
|
CompressionJPEG70: "CompressionJPEG70",
|
||
|
CompressionJPEG60: "CompressionJPEG60",
|
||
|
CompressionJPEG50: "CompressionJPEG50",
|
||
|
CompressionJPEG25: "CompressionJPEG25",
|
||
|
CompressionJPEG10: "CompressionJPEG10",
|
||
|
CompressionJPEG1: "CompressionJPEG1",
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) Valid() bool {
|
||
|
return langext.InArray(e, __ImageCompressonValues)
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) Values() []ImageCompresson {
|
||
|
return __ImageCompressonValues
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) ValuesAny() []any {
|
||
|
return langext.ArrCastToAny(__ImageCompressonValues)
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) ValuesMeta() []enums.EnumMetaValue {
|
||
|
return ImageCompressonValuesMeta()
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) String() string {
|
||
|
return string(e)
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) VarName() string {
|
||
|
if d, ok := __ImageCompressonVarnames[e]; ok {
|
||
|
return d
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) TypeName() string {
|
||
|
return "ImageCompresson"
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) PackageName() string {
|
||
|
return "media"
|
||
|
}
|
||
|
|
||
|
func (e ImageCompresson) Meta() enums.EnumMetaValue {
|
||
|
return enums.EnumMetaValue{VarName: e.VarName(), Value: e, Description: nil}
|
||
|
}
|
||
|
|
||
|
func ParseImageCompresson(vv string) (ImageCompresson, bool) {
|
||
|
for _, ev := range __ImageCompressonValues {
|
||
|
if string(ev) == vv {
|
||
|
return ev, true
|
||
|
}
|
||
|
}
|
||
|
return "", false
|
||
|
}
|
||
|
|
||
|
func ImageCompressonValues() []ImageCompresson {
|
||
|
return __ImageCompressonValues
|
||
|
}
|
||
|
|
||
|
func ImageCompressonValuesMeta() []enums.EnumMetaValue {
|
||
|
return []enums.EnumMetaValue{
|
||
|
CompressionPNGNone.Meta(),
|
||
|
CompressionPNGSpeed.Meta(),
|
||
|
CompressionPNGBest.Meta(),
|
||
|
CompressionJPEG100.Meta(),
|
||
|
CompressionJPEG90.Meta(),
|
||
|
CompressionJPEG80.Meta(),
|
||
|
CompressionJPEG70.Meta(),
|
||
|
CompressionJPEG60.Meta(),
|
||
|
CompressionJPEG50.Meta(),
|
||
|
CompressionJPEG25.Meta(),
|
||
|
CompressionJPEG10.Meta(),
|
||
|
CompressionJPEG1.Meta(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ================================ ================= ================================
|
||
|
|
||
|
func AllPackageEnums() []enums.Enum {
|
||
|
return []enums.Enum{
|
||
|
ImageFitStretch, // ImageFit
|
||
|
CompressionPNGNone, // ImageCompresson
|
||
|
}
|
||
|
}
|