Version: v0.0.0-...-93c0a84 Latest Latest

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 8 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to