gio

package
v0.0.0-...-7bba10c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gio

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

func New

func New(gtx layout.Context, width, height float64) *Gio

New returns a Gio renderer of fixed size.

func NewContain

func NewContain(gtx layout.Context, width, height float64) *Gio

NewContain returns a Gio renderer that fills the constraints either horizontally or vertically, whichever is met first.

func NewStretch

func NewStretch(gtx layout.Context, width, height float64) *Gio

NewStretch returns a Gio renderer that stretches the view to fit the constraints.

func (*Gio) Dimensions

func (r *Gio) Dimensions() layout.Dimensions

Dimensions returns the dimensions for Gio.

func (*Gio) RenderImage

func (r *Gio) RenderImage(img image.Image, m canvas.Matrix)

RenderImage renders an image to the canvas using a transformation matrix.

func (*Gio) RenderPath

func (r *Gio) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

RenderPath renders a path to the canvas using a style and a transformation matrix.

func (*Gio) RenderText

func (r *Gio) RenderText(text *canvas.Text, m canvas.Matrix)

RenderText renders a text object to the canvas using a transformation matrix.

func (*Gio) Size

func (r *Gio) Size() (float64, float64)

Size returns the size of the canvas in millimeters.

Jump to

Keyboard shortcuts

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