menu

package
v0.0.0-...-3d83ec4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: GPL-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnimateWidthSize  float32 = 350.
	AnimateHeightSize float32 = 250.
)

Variables

View Source
var SpriteSize float32 = 80.
View Source
var TileSize float32 = 20.

Functions

This section is empty.

Types

type AnimateMenu

type AnimateMenu struct {
	*ImageMenu
	Originalmages      []*canvas.Image
	AnimateImages      *w.ImageSelectionTable
	DeltaCollection    []*transformation.DeltaCollection
	InitialAddress     *widget.Entry
	RawImages          [][]byte
	OneLine            bool
	OneRow             bool
	ImageToRemoveIndex int
	ExportVersion      animate.DeltaExportFormat
}

func NewAnimateMenu

func NewAnimateMenu() *AnimateMenu

func (*AnimateMenu) CmdLine

func (i *AnimateMenu) CmdLine() string

nolint: funlen

type DoubleImageMenu

type DoubleImageMenu struct {
	LeftImage   *ImageMenu
	RightImage  *ImageMenu
	ResultImage *MergedImageMenu
}

func NewDoubleImageMenu

func NewDoubleImageMenu() *DoubleImageMenu

func (*DoubleImageMenu) CmdLine

func (d *DoubleImageMenu) CmdLine() string

type Editor

type Editor struct {
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor() *Editor

func (*Editor) New

func (e *Editor) New(w fyne.Window) *fyne.Container

type ImageExport

type ImageExport struct {
	ExportDsk              bool
	ExportText             bool
	ExportWithAmsdosHeader bool
	ExportZigzag           bool
	ExportJson             bool
	ExportCompression      compression.CompressionMethod
	ExportFolderPath       string
	M2IP                   string
	ExportToM2             bool
	ExportAsGoFiles        bool
	ExportImpdraw          bool
}

func (*ImageExport) Reset

func (ie *ImageExport) Reset()

type ImageMenu

type ImageMenu struct {
	IsCpcPlus    bool
	IsFullScreen bool
	IsSprite     bool
	IsHardSprite bool
	IsWin        bool
	Mode         int

	Data                []byte
	Downgraded          *image.NRGBA
	DitheringMatrix     [][]float32
	DitheringType       constants.DitheringType
	DitheringAlgoNumber int
	ApplyDithering      bool
	ResizeAlgo          imaging.ResampleFilter
	ResizeAlgoNumber    int

	UsePalette          bool
	DitheringMultiplier float64
	WithQuantification  bool
	Brightness          float64
	Saturation          float64
	Reducer             int
	OneLine             bool
	OneRow              bool
	CmdLineGenerate     string
	UseKmeans           bool
	KmeansThreshold     float64
	Edited              bool
	// contains filtered or unexported fields
}

func NewImageMenu

func NewImageMenu() *ImageMenu

func (*ImageMenu) CmdLine

func (i *ImageMenu) CmdLine() string

nolint: funlen

func (*ImageMenu) CpcImage

func (i *ImageMenu) CpcImage() *canvas.Image

func (*ImageMenu) ExportDialog

func (me *ImageMenu) ExportDialog(ie *ImageExport)

func (*ImageMenu) ExportImage

func (me *ImageMenu) ExportImage(e *ImageExport, w fyne.Window, getCfg func(me *ImageExport, checkOriginalImage bool) *config.MartineConfig)

nolint:funlen, gocognit

func (*ImageMenu) GetHeight

func (i *ImageMenu) GetHeight() (int, string, error)

func (*ImageMenu) GetWidth

func (i *ImageMenu) GetWidth() (int, string, error)

func (*ImageMenu) Height

func (i *ImageMenu) Height() *widget.Entry

func (*ImageMenu) NewConfig

func (me *ImageMenu) NewConfig(ex *ImageExport, checkOriginalImage bool) *config.MartineConfig

func (*ImageMenu) NewFormatRadio

func (me *ImageMenu) NewFormatRadio() *widget.Select

func (*ImageMenu) NewImportButton

func (i *ImageMenu) NewImportButton(modeSelection *widget.Select, callBack func()) *widget.Button

func (*ImageMenu) OriginalImage

func (me *ImageMenu) OriginalImage() *canvas.Image

func (*ImageMenu) OriginalImagePath

func (i *ImageMenu) OriginalImagePath() string

func (*ImageMenu) Palette

func (i *ImageMenu) Palette() color.Palette

func (*ImageMenu) PaletteImage

func (i *ImageMenu) PaletteImage() *canvas.Image

func (*ImageMenu) SetCpcImage

func (i *ImageMenu) SetCpcImage(img image.Image)

func (*ImageMenu) SetImagePalette

func (me *ImageMenu) SetImagePalette(i image.Image, p color.Palette)

func (*ImageMenu) SetOriginalImage

func (me *ImageMenu) SetOriginalImage(img image.Image)

func (*ImageMenu) SetOriginalImagePath

func (i *ImageMenu) SetOriginalImagePath(path fyne.URI)

func (*ImageMenu) SetPalette

func (i *ImageMenu) SetPalette(p color.Palette)

func (*ImageMenu) SetPaletteImage

func (i *ImageMenu) SetPaletteImage(img image.Image)

func (*ImageMenu) SetWindow

func (i *ImageMenu) SetWindow(w fyne.Window)

func (*ImageMenu) Width

func (i *ImageMenu) Width() *widget.Entry

type MergedImageMenu

type MergedImageMenu struct {
	CpcLeftImage      *canvas.Image
	CpcRightImage     *canvas.Image
	CpcResultImage    *canvas.Image
	LeftPalette       color.Palette
	RightPalette      color.Palette
	LeftPaletteImage  *canvas.Image
	RightPaletteImage *canvas.Image
	Data              []byte
	Palette           color.Palette
	PaletteImage      *canvas.Image
	CmdLineGenerate   string
	Path              string
	EgxType           int
}

func NewMergedImageMenu

func NewMergedImageMenu() *MergedImageMenu

func (*MergedImageMenu) CmdLine

func (m *MergedImageMenu) CmdLine() string

type SpriteMenu

type SpriteMenu struct {
	IsHardSprite bool

	FilePath string

	SpritesData            [][][]byte
	CompileSprite          bool
	IsCpcPlus              bool
	OriginalImages         *w.ImageTable
	SpritesCollection      [][]*image.NRGBA
	SpriteColumns          int
	SpriteRows             int
	Mode                   int
	SpriteWidth            int
	SpriteHeight           int
	ExportFormat           export.ExportFormat
	ExportDsk              bool
	ExportText             bool
	ExportWithAmsdosHeader bool
	ExportZigzag           bool
	ExportJson             bool
	ExportCompression      compression.CompressionMethod
	ExportFolderPath       string
	UsePalette             bool

	CmdLineGenerate string
	// contains filtered or unexported fields
}

func NewSpriteMenu

func NewSpriteMenu() *SpriteMenu

func (*SpriteMenu) CmdLine

func (s *SpriteMenu) CmdLine() string

func (*SpriteMenu) ImportSprite

func (s *SpriteMenu) ImportSprite(win fyne.Window) *widget.Button

func (*SpriteMenu) OriginalBoard

func (s *SpriteMenu) OriginalBoard() *canvas.Image

func (*SpriteMenu) Palette

func (s *SpriteMenu) Palette() color.Palette

func (*SpriteMenu) PaletteImage

func (s *SpriteMenu) PaletteImage() *canvas.Image

func (*SpriteMenu) SetOriginalBoard

func (s *SpriteMenu) SetOriginalBoard(img image.Image)

func (*SpriteMenu) SetOriginalPalette

func (s *SpriteMenu) SetOriginalPalette(img image.Image)

func (*SpriteMenu) SetPalette

func (s *SpriteMenu) SetPalette(p color.Palette)

func (*SpriteMenu) SetPaletteImage

func (s *SpriteMenu) SetPaletteImage(img image.Image)

type TilemapMenu

type TilemapMenu struct {
	*ImageMenu
	Result                 *transformation.AnalyzeBoard
	TileImages             *w.ImageTable
	ExportDsk              bool
	ExportText             bool
	ExportWithAmsdosHeader bool
	ExportZigzag           bool
	ExportJson             bool
	ExportCompression      int
	ExportFolderPath       string
	ExportImpdraw          bool
	ExportFlat             bool
}

func NewTilemapMenu

func NewTilemapMenu() *TilemapMenu

func (*TilemapMenu) CmdLine

func (i *TilemapMenu) CmdLine() string

func (*TilemapMenu) ResetExport

func (tm *TilemapMenu) ResetExport()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL