xirhogtk

package
v0.0.0-...-34f8a1a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	gtk.ApplicationWindow
	// contains filtered or unexported fields
}

func New

func New(mainApp *gtk.Application) *Application

func (*Application) PromptNewRenderer

func (app *Application) PromptNewRenderer()

func (*Application) SaveRenderer

func (app *Application) SaveRenderer()

func (*Application) SetNewRenderer

func (app *Application) SetNewRenderer(file string, w, h int)

type NewRendererSetter

type NewRendererSetter interface {
	SetNewRenderer(file string, w, h int)
}

type Renderer

type Renderer struct {
	gtk.Image
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(file string, w, h, oversample int) (*Renderer, error)

NewRenderer creates a new Renderer that's specific to the given file.

func (*Renderer) AspectRatio

func (r *Renderer) AspectRatio() float64

AspectRatio gets the recommended aspect ratio.

func (*Renderer) Close

func (r *Renderer) Close() error

Close always returns nil.

func (*Renderer) QueueDraw

func (r *Renderer) QueueDraw()

QueueDraw queues the drawing.

func (*Renderer) SetBackground

func (r *Renderer) SetBackground(img image.Image)

SetBackground sets the background of the output. Doing so will wipe everything on the pixbuf canvas.

func (*Renderer) SetBackgroundSolid

func (r *Renderer) SetBackgroundSolid(solid color.RGBA)

SetBackgroundSolid sets the background of the output to a solid color instead of an image. This will wipe the canvas clean.

func (*Renderer) SetSize

func (r *Renderer) SetSize(w, h int)

SetSize sets both the width and height of the output. The width and height need not match the aspect ratio.

func (*Renderer) Size

func (r *Renderer) Size() image.Point

Size gets the current size.

func (*Renderer) ToneMap

func (r *Renderer) ToneMap() *xirho.ToneMap

ToneMap returns the renderer's tone map.

Jump to

Keyboard shortcuts

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